-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (49 loc) · 1.33 KB
/
save-api-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
name: Create release
on:
push:
tags:
- 'v*'
env:
GPG_SEC: ${{ secrets.PGP_SEC }}
GPG_PASSWORD: ${{ secrets.PGP_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
jobs:
release:
name: Build release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# release workflow should have access to all tags
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Status git before
run: git status
- name: gradle release
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
arguments: |
--build-cache
--console=rich
-Prelease
-PgprUser=${{ github.actor }}
-PgprKey=${{ secrets.GITHUB_TOKEN }}
publishToSonatype
closeAndReleaseSonatypeStagingRepository
- name: Status git after
if: ${{ always() }}
run: git status
- name: Upload artifact
id: upload_artifact
uses: actions/upload-artifact@v4
with:
name: save-api-${{ runner.os }}
path: save-api/build/*
retention-days: 1