Skip to content

3.12.1

3.12.1 #229

name: Continue release
on:
issue_comment:
types: [created]
permissions:
actions: write
issues: write
defaults:
run:
shell: bash
concurrency:
group: issue-${{ github.event.issue.number }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Display external IP address
run: curl 'https://api64.ipify.org?format=json' || true
- name: Provide visual feedback
uses: quarkusio/conversational-release-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
action: looking
- name: Configure Git author
run: |
git config --global user.email "quarkusio@gmail.com"
git config --global user.name "quarkusbot"
git config --global url."https://api:${{ secrets.RELEASE_GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
git config --global url."https://ssh:${{ secrets.RELEASE_GITHUB_TOKEN }}@github.com/".insteadOf "ssh://git@github.com/"
git config --global url."https://git:${{ secrets.RELEASE_GITHUB_TOKEN }}@github.com/".insteadOf "git@github.com:"
- name: Install lz4
run: sudo apt-get -y install lz4
- name: Check out quarkusio/quarkus-release
uses: actions/checkout@v4
with:
repository: quarkusio/quarkus-release
- name: Check out quarkus-release/release to release
uses: actions/checkout@v4
with:
repository: quarkus-release/release
path: release
- name: Get release status
id: get-release-status
uses: quarkusio/conversational-release-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
action: get-release-status
- name: Get release information
id: get-release-information
uses: quarkusio/conversational-release-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
action: get-release-information
- name: Set up Java environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ steps.get-release-information.outputs.jdk }}
# we do not define the server credentials here as we need to keep the github repository credentials around for executing the GitHub Action
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
- name: Download work artifact
run: |
gh run download ${{ steps.get-release-status.outputs.workflow-run-id }} -n work
tar -I lz4 -xf work.tar.lz4 --directory ../
working-directory: release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Restore ~/.m2/repository cache
uses: actions/cache/restore@v3
with:
path: ~/.m2/repository
# This will never work but it should fallback to the restore key below and get the latest cache for this branch
key: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}-${{ github.run_id }}
restore-keys: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}-
- name: Clean up cache
run: |
[ -d ~/.m2/repository/io/quarkus ] && find ~/.m2/repository/io/quarkus -name 999-SNAPSHOT -type d -exec rm -rf {} +
- name: Push Maven server settings
run: |
sed -i "s@</servers>@<server><id>ossrh</id><username>${{ secrets.MAVEN_SERVER_USERNAME }}</username><password>${{ secrets.MAVEN_SERVER_PASSWORD }}</password></server></servers>@" ~/.m2/settings.xml
- name: Push Gradle publication settings
run: |
mkdir ~/.gradle
echo "gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}" > ~/.gradle/gradle.properties
echo "gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}" >> ~/.gradle/gradle.properties
- name: Continue release
id: release
uses: quarkusio/conversational-release-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
MAVEN_OPTS: -Xmx3g
GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_PASSPHRASE }}
RELEASE_GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_CHOCOLATEY_GITHUB_TOKEN: ${{ secrets.JRELEASER_CHOCOLATEY_GITHUB_TOKEN }}
JRELEASER_CHOCOLATEY_GITHUB_USERNAME: ${{ secrets.JRELEASER_CHOCOLATEY_GITHUB_USERNAME }}
JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.JRELEASER_HOMEBREW_GITHUB_TOKEN }}
JRELEASER_HOMEBREW_GITHUB_USERNAME: ${{ secrets.JRELEASER_HOMEBREW_GITHUB_USERNAME }}
JRELEASER_SDKMAN_CONSUMER_KEY: ${{ secrets.JRELEASER_SDKMAN_CONSUMER_KEY }}
JRELEASER_SDKMAN_CONSUMER_TOKEN: ${{ secrets.JRELEASER_SDKMAN_CONSUMER_TOKEN }}
- name: Create archive for work directory
if: always()
run: tar -I lz4 -cf work.tar.lz4 work
- name: Upload work directory archive as artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: work
path: work.tar.lz4
retention-days: 20
- name: Clean up Maven cache
if: always()
run: |
[ -d ~/.m2/repository/io/quarkus ] && [ -n "${{ steps.release.outputs.version }}" ] && find ~/.m2/repository/io/quarkus -name ${{ steps.release.outputs.version }} -type d -exec rm -rf {} +
[ -d ~/.m2/repository/io/quarkus ] && find ~/.m2/repository/io/quarkus -name 999-SNAPSHOT -type d -exec rm -rf {} +
- name: Save ~/.m2/repository cache
if: always()
uses: actions/cache/save@v3
with:
path: ~/.m2/repository
# A cache cannot be updated so we use a unique id, we use prefix matching restore-keys to restore the cache
key: m2-repository-cache-continue-${{ steps.get-release-information.outputs.branch }}-${{ github.run_id }}
- name: Post interaction comment
uses: quarkusio/conversational-release-action@main
if: always()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
action: post-interaction-comment
interaction-comment: ${{ steps.release.outputs.interaction-comment }}