update changelog (#38) #24
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
release_artifacts: | |
strategy: | |
matrix: | |
os: [ 'macos-latest' ] | |
runs-on: ${{ matrix.os }} | |
outputs: | |
VERSION_NAME: ${{ steps.extract_version_name.outputs.VERSION_NAME }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: JDK setup | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: corretto | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
./build | |
./.gradle | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.m2/repository | |
~/.konan | |
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Validate api compatibility | |
run: ./gradlew apiCheck --no-daemon --stacktrace | |
- name: Get version name | |
id: extract_version_name | |
run: | | |
TAG=${{github.ref_name}} | |
VERSION_NAME="${TAG/v/""}" | |
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_OUTPUT | |
- name: Prepare environment | |
run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > '${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}' | |
- name: Release Artifacts | |
run: | | |
./gradlew publishAllPublicationsToMavenCentralRepository \ | |
-PVERSION_NAME=${{ steps.extract_version_name.outputs.VERSION_NAME }} \ | |
-PmavenCentralUsername=${{ secrets.OSSRH_USERNAME }} \ | |
-PmavenCentralPassword=${{ secrets.OSSRH_PASSWORD }} \ | |
-Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} \ | |
-Psigning.password=${{ secrets.SIGNING_KEY_PASSWORD }} \ | |
-Psigning.secretKeyRingFile=$(pwd)/${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | |
github_release: | |
needs: [ release_artifacts ] | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract release notes | |
id: release_notes | |
uses: ffurrer2/extract-release-notes@v1 | |
with: | |
prerelease: ${{ contains(needs.release_artifacts.outputs.VERSION_NAME,'alpha') || contains(needs.release_artifacts.outputs.VERSION_NAME,'beta') }} | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: ${{ contains(needs.release_artifacts.outputs.VERSION_NAME,'alpha') || contains(needs.release_artifacts.outputs.VERSION_NAME,'beta') }} | |
body: ${{ steps.release_notes.outputs.release_notes }} |