Skip to content

Commit

Permalink
build: Release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellabaj committed Oct 9, 2023
1 parent 968119d commit aa74708
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,19 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: |
mvn -B -U -ntp release:prepare -DreleaseVersion=${{ env.RELEASE_VERSION }} -P release -Darguments=-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
mvn -B -U -ntp release:perform -DreleaseVersion=${{ env.RELEASE_VERSION }} -P release
arice_version=$(mvn help:evaluate -pl pl.com.labaj.autorecord:arice-project -Dexpression=project.version -q -DforceStdout | grep -v '\[.*\]' | awk '{$1=$1};1')
arice_version=${arice_version%-SNAPSHOT}
echo ARICE version: $arice_version
mvn -B -U -ntp versions:set -DnewVersion=$RELEASE_VERSION-SNAPSHOT
echo versions set
git diff --exit-code || git commit -a -m "[ci skip] preset version $RELEASE_VERSION-SNAPSHOT" || echo versions committed
mvn -B -U -ntp release:prepare -P release -Darguments=-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
echo release prepared
commit_hash=$(git rev-list -n 1 v$RELEASE_VERSION)
git tag v-arice$arice_version $commit_hash
git push origin v-arice$arice_version
echo ARICE version tagged
mvn -B -U -ntp release:perform -P release
- name: Create and merge pull request
shell: bash
Expand All @@ -81,7 +92,7 @@ jobs:
echo PR number: $number
gh pr merge $number --admin --delete-branch --rebase
- name: Move the tag to main b ranch
- name: Move the tag to main branch
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit aa74708

Please sign in to comment.