Skip to content

Commit

Permalink
Merge pull request #1176 from Adyen/single-branch-release
Browse files Browse the repository at this point in the history
Single branch for release and development
  • Loading branch information
michaelpaul authored Nov 14, 2023
2 parents 5fe92c1 + 59e6c67 commit 56f61da
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 43 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: Java
secrets: inherit
release-title: Adyen Java API Library
develop-branch: main
secrets:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/models.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/models
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish package to the Maven Central Repository
on:
push:
branches:
- main

on:
release:
types: [published]

jobs:
build:
Expand Down
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/[email protected]
with:
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
develop-branch: main
version-files: pom.xml src/main/java/com/adyen/Client.java README.md
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-java-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 @@ -159,13 +159,5 @@ clean:
git checkout $(models)
git clean -f -d $(models)

## Releases

version:
perl -lne 'print "currentVersion=$$1" if /version>(.+?)<\/version/' < pom.xml | head -1 >> "$$GITHUB_OUTPUT"

version_files:=pom.xml src/main/java/com/adyen/Client.java README.md
bump:
perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' $(version_files)

.PHONY: templates models $(services) version bump
.PHONY: templates models $(services)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ securityKey.setPassphrase("passphrase");

// Use TerminalLocalAPI
TerminalLocalAPI terminalLocalAPI = new TerminalLocalAPI(client, securityKey);
TerminalAPIResponse terminalAPIResponse = terminalLocalApi.request(terminalAPIRequest);
TerminalAPIResponse terminalAPIResponse = terminalLocalAPI.request(terminalAPIRequest);
~~~~

## Using the Local Terminal API Integration without Encryption (Only on TEST)
Expand Down Expand Up @@ -488,7 +488,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-java-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 Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.0.0

0 comments on commit 56f61da

Please sign in to comment.