Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bischoffz committed Jun 20, 2024
1 parent abe98e3 commit 1431df0
Showing 1 changed file with 2 additions and 49 deletions.
51 changes: 2 additions & 49 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,56 +58,9 @@ jobs:
tag: "v${{ env.version }}"
generateReleaseNotes: true
skipIfReleaseExists: true

update-gcm:
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
env:
VERSION: ${{ needs.release.outputs.util_version }}
steps:
- name: Checkout GCM
uses: actions/checkout@v4
with:
repository: HHS/ASPR-8
token: ${{ secrets.GHA_BOT }}

- name: Update Util version
run : |
echo "$VERSION"
sed -i "0,/<util.version>.*<\/util.version>/s//<util.version>$VERSION<\/util.version>/g" pom.xml
- name: Increment GCM Version
run: |
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)
echo GCM Version: $current_version
parts=( ${current_version//./ } )
bv=$((parts[2] + 1))
new_version="${parts[0]}.${parts[1]}.${bv}"
echo New GCM Version: $new_version
sed -i "0,/<revision>.*<\/revision>/s//<revision>$new_version<\/revision>/g" pom.xml
- name: Setup Git
run: |
git config --global user.name "github-actions"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Make branch in GCM
run: |
git checkout -b update-util-to-$VERSION
git add pom.xml
git commit -m "Update util to $VERSION"
git push --set-upstream origin update-util-to-$VERSION
- name: Make PR in GCM
run: |
gh pr create -R HHS/ASPR-8 -B main --fill
gh pr merge -m --auto
env:
GH_TOKEN: ${{ secrets.GHA_BOT }}


update-taskit:
if: ${{ !endsWith(needs.release.outputs.util_version, '0') }}
needs: release
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit 1431df0

Please sign in to comment.