This repository has been archived by the owner on Jun 9, 2024. It is now read-only.
Update plugin spotless to v6.21.0 #46
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: 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@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- 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@v5.3.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 }}" |