Skip to content

use snapshot for release drafter. (#2) #2

use snapshot for release drafter. (#2)

use snapshot for release drafter. (#2) #2

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@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v4
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradlew-
- uses: crazy-max/[email protected]
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 -Psign-required=true publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion="${{ steps.release.outputs.tag_name }}-SNAPSHOT" -PinfumiaSigningKey="${{ secrets.GPG_SECRET_KEY_ID }}" -PinfumiaSigningPassword="${{ secrets.GPG_PASSPHRASE }}" -PsonatypeUsername="${{ secrets.SONATYPE_USERNAME }}" -PsonatypePassword="${{ secrets.SONATYPE_PASSWORD }}"