Skip to content

Update actions/setup-java action to v4 #95

Update actions/setup-java action to v4

Update actions/setup-java action to v4 #95

Workflow file for this run

name: Update Snapshot
on:
push:
branches: [ master ]
jobs:
snapshot:
name: Update Snapshot
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'skip-snapshot') }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
- uses: arduino/setup-protoc@v1
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradlew-
- uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- uses: release-drafter/release-drafter@master
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
[[ "${{ steps.release.outputs.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1
chmod +x gradlew
./gradlew -Pdev=false publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion="${{ steps.release.outputs.tag_name }}-SNAPSHOT" -Psigning.gnupg.keyName="${{ secrets.GPG_SECRET_KEY_ID }}" -Psigning.gnupg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -PsonatypeUsername="${{ secrets.SONATYPE_USERNAME }}" -PsonatypePassword="${{ secrets.SONATYPE_PASSWORD }}"