forked from line/armeria
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.87 KB
/
publish-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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/actions/setup-gradle@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 }}