Skip to content

fix: v1-release-process-to-test #705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: true
on:
pull_request:
branches: [ master, v2 ]
branches: [ master, v1 ]
workflow_dispatch:
jobs:
build:
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
if: ${{ startsWith(github.event.release.tag_name, 'v1.' ) }}
with:
ref: "v1"
- uses: actions/checkout@v2
if: ${{ startsWith(github.event.release.tag_name, 'v2.') }}
- name: Set up Java and Maven
uses: actions/setup-java@v2
with:
Expand All @@ -20,20 +25,25 @@ jobs:
run: ./mvnw ${MAVEN_ARGS} versions:set -DnewVersion="${RELEASE_VERSION:1}" versions:commit
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
maven_profiles: "release"
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_TOKEN }}
# - name: Release Maven package
# uses: samuelmeuli/action-maven-publish@v1
# with:
# maven_profiles: "release"
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
# nexus_username: ${{ secrets.OSSRH_USERNAME }}
# nexus_password: ${{ secrets.OSSRH_TOKEN }}

# This is separate job because there were issues with git after release step, was not able to commit changes. See history.
update-working-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
if: ${{ startsWith(github.event.release.tag_name, 'v1.' ) }}
with:
ref: "v1"
- uses: actions/checkout@v2
if: ${{ startsWith(github.event.release.tag_name, 'v2.') }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need that part? I mean v2 is now master so we should only have a special for v1 now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question, this forces v2 but don't have strong opinion in this. Can remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh you mean the if part? Yes that is needed so its no double checkout for v1

- name: Set up Java and Maven
uses: actions/setup-java@v2
with:
Expand All @@ -49,7 +59,14 @@ jobs:
git commit -m "Set new SNAPSHOT version into pom files." -a
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
- name: Push changes
- name: Push changes v1
uses: ad-m/github-push-action@master
if: ${{ startsWith(github.event.release.tag_name, 'v1.' ) }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: "v1"
- name: Push changes v2
uses: ad-m/github-push-action@master
if: ${{ startsWith(github.event.release.tag_name, 'v2.' ) }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}