Bump static JDK version (#1282) #2
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: | |
runs-on: ubuntu-latest | |
outputs: | |
deployment: ${{ steps.deploy.outputs.exit_code }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 5 | |
persist-credentials: false | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Import GPG keys | |
run: | | |
gpg --import --batch <(echo "$GPG_PRIVATE_KEY") &> /dev/null | |
# Gradle doesn't support GPG 2.1 and later: https://github.com/gradle/gradle/issues/888 | |
gpg --export-secret-keys --pinentry-mode loopback --passphrase="$GPG_PASSPHRASE" > ~/.gnupg/secring.gpg | |
rm -rf /tmp/secret | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Deploy to Sonatype Nexus | |
id: deploy | |
run: | | |
./gradlew publish closeAndReleaseRepository --info -PsonatypeUsername=$SONATYPE_USERNAME -PsonatypePassword=$SONATYPE_PASSWORD -Psigning.keyId=$GPG_KEYNAME -Psigning.password=$GPG_PASSPHRASE -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg | |
echo ::set-output name=exit_code::$? | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | |
commit-development-version: | |
runs-on: ubuntu-latest | |
needs: [ release ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 5 | |
persist-credentials: false | |
- name: Commit next development version | |
if: needs.release.outputs.deployment == 0 | |
run: | | |
git config user.email "githubbot@gluonhq.com" | |
git config user.name "Gluon Bot" | |
TAG=${GITHUB_REF/refs\/tags\//} | |
newVersion=${TAG%.*}.$((${TAG##*.} + 1)) # Update version by 1 | |
sed -i -z "0,/version = $TAG/s//version = $newVersion-SNAPSHOT/" gradle.properties | |
git commit gradle.properties -m "Prepare development of $newVersion" | |
git push https://gluon-bot:$PAT@github.com/$GITHUB_REPOSITORY HEAD:master | |
env: | |
PAT: ${{ secrets.GITHUB_TOKEN }} | |
release-notes: | |
runs-on: ubuntu-latest | |
needs: [ release ] | |
steps: | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
release-gluonfx-plugins: | |
runs-on: ubuntu-latest | |
needs: [ release ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 5 | |
persist-credentials: false | |
- run: | | |
TAG=${GITHUB_REF/refs\/tags\//} | |
bash $GITHUB_WORKSPACE/.github/scripts/release-plugins.sh $TAG $PAT | |
env: | |
PAT: ${{ secrets.PAT }} |