Add release change log #49
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: | |
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5 | |
jobs: | |
cleanup-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Set tag version | |
id: get_ver | |
run: | | |
echo "::set-output name=release_tag::${GITHUB_REF##*/}" | |
- name: Create release ${{ steps.get_ver.outputs.release_tag }} | |
uses: actions/create-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
body_path: RELEASE_CHANGELOG.md | |
publish-libraries: | |
needs: release | |
runs-on: ubuntu-latest | |
name: Publishing Explorer Libraries | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Java Setup | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
server-id: github | |
- name: GPG Setup | |
env: | |
GPG_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
run: | | |
export GPG_TTY=$(tty) | |
echo -n "$GPG_KEY" | base64 --decode | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
echo -n "$GPG_KEY" | base64 --decode > $GITHUB_WORKSPACE/release.gpg | |
- name: Build and Publish | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
GPG_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
run: | | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
VERSION=$(echo $VERSION | sed -e 's/^v//') | |
echo version::${VERSION} | |
./gradlew publishToSonatype \ | |
closeAndReleaseSonatypeStagingRepository \ | |
-Pversion=${VERSION} \ | |
-PartifactVersion=${VERSION} \ | |
-Psigning.keyId=B7D30ABE \ | |
-Psigning.password="$GPG_PASSWORD" \ | |
-Psigning.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg \ | |
--info |