Skip to content

Commit

Permalink
Splitting release.yml in three jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
sbglasius committed Dec 30, 2023
1 parent b4d8a45 commit eb842a4
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,20 @@ jobs:
SECRING_FILE: ${{ secrets.SECRING_FILE }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SIGNING_FILE: ${{ github.workspace }}/secring.pgp
SIGNING_FILE: ${{ github.workspace }}/secring.pgp
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
run: |
echo "${SECRING_FILE}" | base64 -d > "${SIGNING_FILE}"
echo "Publishing Artifacts for $RELEASE_VERSION"
(set -x; ./gradlew -Pversion="${RELEASE_VERSION}" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
rm "${SIGNING_FILE}"
bump-version:
runs-on: ubuntu-latest
needs: release
env:
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
steps:
- name: Bump patch version by one for next SNAPSHOT
uses: dhkatz/[email protected]
id: patch_version
Expand All @@ -48,27 +55,30 @@ jobs:
run: |
echo "Preparing next snapshot"
./gradlew snapshotVersion -Pversion="${NEXT_VERSION}"
- name: Commit & Push changes
uses: actions-js/push@master
- uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
author_name: ${{ secrets.GIT_USER_NAME }}
author_email: $${ secrets.GIT_USER_EMAIL }}
message: 'Set project version to next SNAPSHOT'
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Build documentation
documenation:
runs-on: ubuntu-latest
needs: bump-version
env:
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
steps:
- uses: dhkatz/[email protected]
id: get_version
- uses: micronaut-projects/github-actions/export-gradle-properties@master
id: asciidoctor
uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v2
env:
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }}
with:
arguments: -Pversion="${RELEASE_VERSION}" asciidoctor
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
- name: Publish to Github Pages
- uses: micronaut-projects/github-pages-deploy-action@master
if: success()
uses: micronaut-projects/github-pages-deploy-action@master
env:
BETA: ${{ steps.get_version.outputs.isPrerelase }}
TARGET_REPOSITORY: ${{ github.repository }}
Expand All @@ -79,8 +89,7 @@ jobs:
COMMIT_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
COMMIT_NAME: ${{ secrets.GIT_USER_NAME }}
VERSION: ${{ steps.get_version.outputs.version-without-v }}
- name: Run post-release
- uses: micronaut-projects/github-actions/post-release@master
if: success()
uses: micronaut-projects/github-actions/post-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GH_TOKEN }}

0 comments on commit eb842a4

Please sign in to comment.