-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (30 loc) · 1.04 KB
/
CD.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
name: CD
on:
release:
types: [ created ]
concurrency:
group: "cd"
cancel-in-progress: false
env:
GRADLE_OPTS: -Dorg.gradle.caching=true
jobs:
build:
runs-on: macos-14
environment:
name: CD
steps:
- name: Set environment for version
run: long="${{ github.ref }}"; version=${long#"refs/tags/v"}; echo "version=${version}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- name: Publish
run: ./gradlew -Pversion=$version -Dorg.gradle.parallel=false --no-configuration-cache publish :closeAndReleaseStagingRepository
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONARTYPE_APIKEY }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONARTYPE_APITOKEN }}