Merge pull request #40 from rundeck-plugins/grails7-upgrade #29
Workflow file for this run
This file contains hidden or 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
| on: | |
| push: | |
| tags: | |
| - '*.*.*' | |
| name: Publish Release | |
| jobs: | |
| build: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'zulu' | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Get Release Version | |
| id: get_version | |
| run: VERSION=$(./gradlew currentVersion -q -Prelease.quiet) && echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| run: | | |
| gh release create \ | |
| --generate-notes \ | |
| --title 'Release ${{ steps.get_version.outputs.VERSION }}' \ | |
| ${{ github.ref_name }} \ | |
| build/libs/http-step-${{ steps.get_version.outputs.VERSION }}.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to Maven Central | |
| run: ./gradlew -PsigningKey=${SIGNING_KEY_B64} -PsigningPassword=${SIGNING_PASSWORD} -PsonatypeUsername=${SONATYPE_USERNAME} -PsonatypePassword=${SONATYPE_PASSWORD} publishToSonatype closeAndReleaseSonatypeStagingRepository | |
| env: | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| SIGNING_KEY_B64: ${{ secrets.SIGNING_KEY_B64 }} | |
| SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} |