-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (64 loc) · 1.95 KB
/
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
62
63
64
65
66
67
68
69
70
71
72
name: 'Release'
on:
push:
tags:
- 'v*'
env:
GRADLE_OPTS: -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.welcome=never
GPG_SEC: ${{ secrets.PGP_SEC }}
GPG_PASSWORD: ${{ secrets.PGP_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
jobs:
release:
name: 'Release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch Git tags, so that semantic version can be calculated.
# Alternatively, run `git fetch --prune --unshallow --tags` as the
# next step, see
# https://github.com/actions/checkout/issues/206#issuecomment-607496604.
fetch-depth: 0
- name: 'Set up Java'
uses: actions/setup-java@v4
with:
java-version: 8
distribution: zulu
java-package: jdk+fx
- name: 'Publish a release to GitHub'
id: publish-github
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
arguments: |
-Preckon.stage=
publishAllPublicationsToGitHubRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Publish a release to Maven Central'
id: publish-sonatype
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
arguments: |
-Preckon.stage=
publishToSonatype
closeAndReleaseSonatypeStagingRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_release:
needs: release
name: 'Github Release'
runs-on: ubuntu-latest
steps:
- name: 'Github Release'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false