Skip to content

Release

Release #21

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
name: Create release
runs-on: macos-latest
permissions: write-all
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Extract version name
id: extract_name
run: echo "name=$(echo ${GITHUB_REF##*/})" >>$GITHUB_OUTPUT
shell: bash
- name: Checkout to push branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
with:
name: Release ${{ steps.extract_name.outputs.name }}
body: ${{ steps.changelog.outputs.changelog }}
publish:
name: Publish release
permissions: write-all
runs-on: macos-latest
needs: release
steps:
- name: Checkout to push branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Extract version from tag
uses: damienaicheh/[email protected]
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'corretto'
- name: Publish to MavenCentral
run: ./gradlew publishAllPublicationsToSonatypeRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}