Skip to content

Commit

Permalink
Single branch for release and development (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpaul committed Nov 14, 2023
1 parent d6253f9 commit 72bd797
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 38 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Github Release
name: Automatic Github release

on:
workflow_dispatch:
push:
branches:
- main
workflow_dispatch:
push:
branches:
- main
paths:
- VERSION

jobs:
gh_release:
github:
permissions:
contents: write
uses: Adyen/adyen-node-api-library/.github/workflows/lib-gh-release.yml@develop
uses: Adyen/release-automation-action/.github/workflows/reusable-github-release.yml@v1.1.1
with:
project-name: Python
secrets: inherit
release-title: Adyen Python API Library
develop-branch: main
secrets:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
41 changes: 25 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: Release request
name: Prepare release

on:
workflow_dispatch:
inputs:
prerelease:
required: false
type: boolean
default: false
description: "This release will be labeled as non-production ready"
push:
branches:
- develop
workflow_dispatch:
inputs:
pre-release:
required: false
type: boolean
default: false
description: "This release will be labeled as non-production ready"
pull_request:
types:
- closed
branches:
- main

jobs:
release:
candidate:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && !startsWith(github.head_ref, 'promote/'))
permissions:
contents: write
pull-requests: write
uses: Adyen/adyen-node-api-library/.github/workflows/lib-release.yml@develop
with:
prerelease: ${{ inputs.prerelease || false }}
secrets: inherit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare the next main release
uses: Adyen/release-automation-action@v1.1.1
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
develop-branch: main
version-files: setup.py Adyen/settings.py
pre-release: ${{ inputs.pre-release || false }}
2 changes: 1 addition & 1 deletion .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
base: develop
base: main
branch: automation/services
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## How to contribute step-by-step

1. Fork the `Adyen/adyen-python-api-library` repository.
2. Create a new branch from `develop` in your fork. This makes it easier for you to keep track of your changes.
2. Create a new branch from `main` in your fork. This makes it easier for you to keep track of your changes.
3. Make the desired changes to the code.
* If you are adding new functionality or fixing a bug, we recommend you add unit tests that cover it.
4. Push the changes to your fork.
Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,5 @@ generateCheckoutTest: build/spec $(openapi-generator-jar)
cp $(output)/api/api-test.py test/methodNamesTests/checkoutTest.py
rm -rf build

## Releases

version:
grep version= setup.py | tr -d \', | awk -F '=' '{ printf "currentVersion=%s\n", $$2 }' >> "$$GITHUB_OUTPUT"

bump:
perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' setup.py Adyen/settings.py


.PHONY: $(services) version bump
.PHONY: $(services)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ We value your input! Help us enhance our API Libraries and improve the integrati

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

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.
Have a look at our [contributing guidelines](CONTRIBUTING.md) to find out how to raise a pull request.

## Support

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

## Licence

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

## See also

Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.0.0

0 comments on commit 72bd797

Please sign in to comment.