Merge pull request #43 from rundeck-plugins/snyk-weekly #12
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: | |
| branches: | |
| - master # Trigger on commits to the master branch | |
| tags-ignore: | |
| - '*' # Exclude all pushes that are tags | |
| name: Snapshot Release | |
| jobs: | |
| build: | |
| name: Upload Release Asset | |
| 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: 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 }} |