Skip to content

Commit

Permalink
ci(release): update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Sep 3, 2023
1 parent 617c9c9 commit fbde40d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]

env:
JAVA_VERSION: '17'
JAVA_DISTRO: 'zulu'
GRAAL_VERSION: '22.3.3'
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: 'Set up JDK'
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
check-latest: true
cache: maven

Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ on:
required: true
description: "Create a Tag"
default: true

env:
JAVA_VERSION: '17'
JAVA_DISTRO: 'zulu'
GRAAL_VERSION: '22.3.3'
jobs:
set-release-version:
runs-on: ubuntu-latest
Expand All @@ -22,11 +25,11 @@ jobs:
with:
clean: true

- name: 'Set up JDK 17'
- name: 'Set up Java'
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
check-latest: true
cache: maven

Expand Down Expand Up @@ -58,11 +61,10 @@ jobs:
if: "${{ github.event.inputs.createTag == 'true' }}"
run: |
find . -name 'pom.xml' | xargs git add
git commit -m "ci: release version ${{ RELEASE_VERSION }} 🎉"
git commit -m "ci: release version ${{ env.RELEASE_VERSION }} 🎉"
git push --atomic origin HEAD:main
HEAD=$(git rev-parse HEAD)
echo "HEAD=$HEAD" >> $GITHUB_OUTPUT
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT
build-distribution:
needs: [ set-release-version ]
Expand All @@ -82,8 +84,8 @@ jobs:
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7'
distribution: 'graalvm'
version: ${{ env.GRAAL_VERSION }}
java-version: ${{ env.JAVA_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: 'Build Native Image (${{ runner.os }})'
Expand Down

0 comments on commit fbde40d

Please sign in to comment.