Publish final artifacts to Maven Central repository #38
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: Publish final artifacts to Maven Central repository | |
on: | |
push: | |
tags: | |
- armeria-* | |
env: | |
LC_ALL: "en_US.UTF-8" | |
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | |
jobs: | |
publish: | |
name: Publish final artifacts | |
if: github.repository == 'line/armeria' | |
runs-on: self-hosted-safe | |
steps: | |
- uses: actions/checkout@v4 | |
- id: setup-jdk-19 | |
name: Set up JDK 19 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '19' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Build with Gradle | |
run: | | |
./gradlew --no-daemon --stacktrace --max-workers=8 --parallel -PflakyTests=false \ | |
-Pretry=true -PfailOnPassedAfterRetry=false \ | |
build | |
shell: bash | |
- name: Publish and close repository | |
run: | | |
./gradlew --no-daemon --stacktrace --max-workers=1 publish closeAndReleaseStagingRepository | |
env: | |
# Should not use '-P' option with 'secrets' that can cause unexpected results | |
# if secret values contains white spaces or new lines. | |
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USER_NAME }} | |
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSWORD }} | |
shell: bash | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Perform post-release process | |
working-directory: .github/actions | |
run: | | |
npm ci | |
npm run post-release ${{ github.ref_name }} | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |