Skip to content

1.0.1

1.0.1 #7

Workflow file for this run

name: Publish release
on:
release:
types: [ published ]
jobs:
create-staging-repository:
runs-on: ubuntu-latest
name: "Create Sonatype Staging Repository"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- run: ./gradlew initializeSonatypeStagingRepository
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_REPOSITORY_DESCRIPTION: ${{ github.event_name }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.ref_name }}
publish-artifacts:
needs: [ create-staging-repository ]
strategy:
matrix:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
name: "Publish artifacts on ${{ matrix.os }}"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- run: ./gradlew findSonatypeStagingRepository -x initializeSonatypeStagingRepository publishToSonatype
env:
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_REPOSITORY_DESCRIPTION: ${{ github.event_name }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.ref_name }}
close-staging-repository:
needs: [ publish-artifacts ]
runs-on: ubuntu-latest
name: "Close Sonatype Staging Repository"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- run: chmod +x gradlew
- run: ./gradlew findSonatypeStagingRepository -x initializeSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_REPOSITORY_DESCRIPTION: ${{ github.event_name }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.ref_name }}