Merge pull request #26 from rundeck-plugins/fix/null-value #3
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: | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| 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 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| 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 | |
| id: create_release | |
| run: | | |
| gh release create \ | |
| --generate-notes \ | |
| --title 'Release ${{ steps.get_version.outputs.VERSION }}' \ | |
| ${{ github.ref_name }} \ | |
| build/libs/attribute-match-node-enhancer-${{ 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 }} |