Release #143
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: | |
workflow_dispatch: | |
inputs: | |
versionname: | |
description: 'Version Name' | |
required: true | |
default: '' | |
changes: | |
description: 'Release notes' | |
required: true | |
default: '' | |
jobs: | |
release: | |
name: Release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Install gpg secret key | |
run: cat <(echo -e "${{ secrets.PUBLISH_SIGNING_KEY_LITERAL }}") | gpg --batch --import | |
- name: List gpg secret keys | |
run: gpg --list-secret-keys --keyid-format LONG | |
- name: Export gpg secret key | |
run: sudo gpg --export-secret-keys --pinentry-mode loopback --passphrase=${{ secrets.PUBLISH_SIGNING_KEY_PASSWORD }} ${{ secrets.PUBLISH_SIGNING_KEY_ID }} > ${{ secrets.PUBLISH_SIGNING_KEY_LOCATION }} | |
- name: Update Version Name | |
run: ./gradlew updateVersion -PversionName=${{ github.event.inputs.versionname }} | |
- name: Publish Release | |
env: | |
PUBLISH_GITHUB_USER: ${{ secrets.PUBLISH_GITHUB_USER }} | |
PUBLISH_GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} | |
PUBLISH_SONATYPE_USER: ${{ secrets.PUBLISH_SONATYPE_USER }} | |
PUBLISH_SONATYPE_PASSWORD: ${{ secrets.PUBLISH_SONATYPE_PASSWORD }} | |
PUBLISH_SIGNING_KEY_ID: ${{ secrets.PUBLISH_SIGNING_KEY_ID }} | |
PUBLISH_SIGNING_KEY_PASSWORD: ${{ secrets.PUBLISH_SIGNING_KEY_PASSWORD }} | |
PUBLISH_SIGNING_KEY_LOCATION: ${{ secrets.PUBLISH_SIGNING_KEY_LOCATION }} | |
run: ./gradlew publishAllPublicationsToSonatypeRepository --no-parallel # publishAllPublicationsToGitHubPackagesRepository | |
- name: Update Repo | |
uses: EndBug/add-and-commit@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} | |
with: | |
add: "./version.properties" | |
message: ${{ format('Released {0}', github.event.inputs.versionname) }} | |
push: true | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.event.inputs.versionname }} | |
release_name: Release ${{ github.event.inputs.versionname }} | |
body: ${{ github.event.inputs.changes }} | |
draft: false | |
prerelease: false |