Release 3.2.3-RC1 #33
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*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
cache: 'gradle' | |
- name: Check version | |
run: | | |
VERSION_TAG=${{ github.ref_name }} | |
VERSION_TAG=${VERSION_TAG#v} | |
PROJECT_VERSION=$(grep "^version=" gradle.properties | cut -d'=' -f2) | |
if [[ "$PROJECT_VERSION" == "${VERSION_TAG}-SNAPSHOT" ]]; then | |
echo "Version match: tag $VERSION_TAG matches project version $PROJECT_VERSION, proceeding with release" | |
else | |
echo "Version mismatch: tag $VERSION_TAG does not match project version $PROJECT_VERSION" | |
exit 1 | |
fi | |
- name: Decrypt secring.gpg | |
run: openssl enc -aes-256-cbc -d -pbkdf2 -in private.key.bin -out private.key -pass pass:${{ secrets.privateKeyPassword }} | |
- name: Release | |
run: RELEASE=true OSSRH_USER=${{ secrets.OSSRH_USER }} OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }} ./gradlew publish -Psigning.secretKeyRingFile=$(pwd)/private.key -Psigning.keyId=${{ secrets.signKeyId }} -Psigning.password=${{ secrets.signPassword }} |