-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.45 KB
/
publish.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
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.semver.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
- uses: tynn-xyz/semantic-version@v1
with:
versioning: ${{ github.ref }}
id: semver
- uses: gradle/gradle-build-action@v3
env:
ORG_GRADLE_PROJECT_version: ${{ steps.semver.outputs.version }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.NEXUS_USERNAME }}
PROJECT_URL: 'https://github.com/${{ github.repository }}'
SIGNING_PASSWORD: ${{ secrets.PGP_PASSWORD }}
SIGNING_KEY: ${{ secrets.PGP_KEY }}
with:
arguments: publishReleasePublicationToSonatypeRepository closeSonatypeStagingRepository
cache-read-only: true
release:
runs-on: ubuntu-latest
needs: publish
steps:
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ needs.publish.outputs.version }}
body: |
Automated library release
draft: false
prerelease: false