v4.0.0 for Grails 6.1.x #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
GIT_USER_NAME: sbglasius | |
GIT_USER_EMAIL: soeren@glasius.dk | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: temurin | |
- uses: dhkatz/get-version-action@v3.0.0 | |
id: get_version | |
- uses: micronaut-projects/github-actions/pre-release@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to Sonatype OSSRH | |
id: publish | |
uses: gradle/gradle-build-action@v2 | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
SIGN_ARMORED_KEY: ${{ secrets.SIGN_ARMORED_KEY }} | |
SIGN_PASSWORD: ${{ secrets.SIGNING_PASSPHRASE }} | |
RELEASE_VERSION: ${{ steps.get_version.outputs.version-without-v }} | |
with: | |
arguments: -info -Prelease=true :external-config:publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon | |
- name: Bump patch version by one | |
uses: flatherskevin/semver-action@v1 | |
id: version | |
with: | |
incrementLevel: patch | |
source: tags | |
- name: Set version in gradle.properties | |
env: | |
NEXT_VERSION: ${{ steps.version.outputs.nextVersion }} | |
run: | | |
echo "Preparing next snapshot" | |
./gradlew snapshotVersion -Pversion="${NEXT_VERSION}" | |
- name: Commit & Push changes | |
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: Run post-release | |
if: success() | |
uses: micronaut-projects/github-actions/post-release@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |