Skip to content

Commit 72bd797

Browse files
authored
Single branch for release and development (#275)
1 parent d6253f9 commit 72bd797

File tree

7 files changed

+44
-38
lines changed

7 files changed

+44
-38
lines changed

.github/workflows/gh-release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
name: Github Release
1+
name: Automatic Github release
22

33
on:
4-
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- VERSION
810

911
jobs:
10-
gh_release:
12+
github:
1113
permissions:
1214
contents: write
13-
uses: Adyen/adyen-node-api-library/.github/workflows/lib-gh-release.yml@develop
15+
uses: Adyen/release-automation-action/.github/workflows/reusable-github-release.yml@v1.1.1
1416
with:
15-
project-name: Python
16-
secrets: inherit
17+
release-title: Adyen Python API Library
18+
develop-branch: main
19+
secrets:
20+
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}

.github/workflows/release.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1-
name: Release request
1+
name: Prepare release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
prerelease:
7-
required: false
8-
type: boolean
9-
default: false
10-
description: "This release will be labeled as non-production ready"
11-
push:
12-
branches:
13-
- develop
4+
workflow_dispatch:
5+
inputs:
6+
pre-release:
7+
required: false
8+
type: boolean
9+
default: false
10+
description: "This release will be labeled as non-production ready"
11+
pull_request:
12+
types:
13+
- closed
14+
branches:
15+
- main
1416

1517
jobs:
16-
release:
18+
candidate:
19+
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && !startsWith(github.head_ref, 'promote/'))
1720
permissions:
1821
contents: write
1922
pull-requests: write
20-
uses: Adyen/adyen-node-api-library/.github/workflows/lib-release.yml@develop
21-
with:
22-
prerelease: ${{ inputs.prerelease || false }}
23-
secrets: inherit
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Prepare the next main release
27+
uses: Adyen/release-automation-action@v1.1.1
28+
with:
29+
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
30+
develop-branch: main
31+
version-files: setup.py Adyen/settings.py
32+
pre-release: ${{ inputs.pre-release || false }}

.github/workflows/services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
2323
committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
2424
author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
25-
base: develop
25+
base: main
2626
branch: automation/services
2727
title: ${{ steps.vars.outputs.pr_title }}
2828
body: ${{ steps.vars.outputs.pr_body }}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## How to contribute step-by-step
44

55
1. Fork the `Adyen/adyen-python-api-library` repository.
6-
2. Create a new branch from `develop` in your fork. This makes it easier for you to keep track of your changes.
6+
2. Create a new branch from `main` in your fork. This makes it easier for you to keep track of your changes.
77
3. Make the desired changes to the code.
88
* If you are adding new functionality or fixing a bug, we recommend you add unit tests that cover it.
99
4. Push the changes to your fork.

Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,5 @@ generateCheckoutTest: build/spec $(openapi-generator-jar)
9090
cp $(output)/api/api-test.py test/methodNamesTests/checkoutTest.py
9191
rm -rf build
9292

93-
## Releases
9493

95-
version:
96-
grep version= setup.py | tr -d \', | awk -F '=' '{ printf "currentVersion=%s\n", $$2 }' >> "$$GITHUB_OUTPUT"
97-
98-
bump:
99-
perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' setup.py Adyen/settings.py
100-
101-
102-
.PHONY: $(services) version bump
94+
.PHONY: $(services)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ We value your input! Help us enhance our API Libraries and improve the integrati
186186

187187
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.
188188

189-
Have a look at our [contributing guidelines](https://github.com/Adyen/adyen-python-api-library/blob/develop/CONTRIBUTING.md) to find out how to raise a pull request.
189+
Have a look at our [contributing guidelines](CONTRIBUTING.md) to find out how to raise a pull request.
190190

191191
## Support
192192

@@ -196,7 +196,7 @@ For other questions, [contact our Support Team](https://www.adyen.help/hc/en-us/
196196

197197
## Licence
198198

199-
This repository is available under the [MIT license](https://github.com/Adyen/adyen-python-api-library/blob/main/LICENSE.md).
199+
This repository is available under the [MIT license](LICENSE.md).
200200

201201
## See also
202202

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10.0.0

0 commit comments

Comments
 (0)