Skip to content

Commit

Permalink
release.yml using env's for NEXT_VERSION in bump-snapshot-version and…
Browse files Browse the repository at this point in the history
… RELEASE_VERSION in documentation jobs
  • Loading branch information
sbglasius committed Jan 1, 2024
1 parent 6b54957 commit 5437bde
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ jobs:
rm "${SIGNING_FILE}"
bump-snapshot-version:
runs-on: ubuntu-latest
needs: [get-version, release]
needs: [ get-version, release ]
env:
GIT_USER_NAME: ${{ vars.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ vars.GIT_USER_EMAIL }}
NEXT_VERSION: ${{ needs.get-version.outputs.next-patch-version }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -72,8 +73,6 @@ jobs:
java-version: 8
distribution: temurin
- name: Set version in gradle.properties
env:
NEXT_VERSION: ${{ needs.get-version.outputs.next-patch-version }}
run: |
echo "Preparing next snapshot as ${NEXT_VERSION}"
./gradlew snapshotVersion -Pversion="${NEXT_VERSION}"
Expand All @@ -83,13 +82,14 @@ jobs:
author_name: ${{ vars.GIT_USER_NAME }}
author_email: $${ vars.GIT_USER_EMAIL }}
branch: master
message: 'Set project version to ${{ needs.release.outputs.next-patch-version }}-SNAPSHOT'
message: Set project version to ${NEXT_VERSION}-SNAPSHOT
documenation:
runs-on: ubuntu-latest
needs: [ get-version, release ]
env:
GIT_USER_NAME: ${{ vars.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ vars.GIT_USER_EMAIL }}
RELEASE_VERSION: ${{ needs.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -101,22 +101,19 @@ jobs:
- uses: micronaut-projects/github-actions/export-gradle-properties@master
id: asciidoctor
- uses: gradle/gradle-build-action@v2
env:
RELEASE_VERSION: ${{ needs.get-version.outputs.version }}
with:
arguments: -Pversion="${RELEASE_VERSION}" asciidoctor
- uses: micronaut-projects/github-pages-deploy-action@master
if: success()
env:
BETA: ${{ steps.get_version.outputs.isPrerelase }}
TARGET_REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
BRANCH: gh-pages
FOLDER: build/asciidoc
DOC_FOLDER: latest
COMMIT_EMAIL: ${{ vars.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ vars.GIT_USER_NAME }}
VERSION: ${{ needs.release.outputs.version }}
VERSION: ${RELEASE_VERSION}
- uses: micronaut-projects/github-actions/post-release@master
if: success()
with:
Expand Down

0 comments on commit 5437bde

Please sign in to comment.