-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (44 loc) · 1.37 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
name: Release message
on:
release:
types: [ published ]
jobs:
release:
strategy:
matrix:
java: [ "17" ]
os: [ "ubuntu-latest" ]
runs-on: ${{ matrix.os }}
steps:
- name: "checkout"
uses: actions/checkout@v3
- name: "setup jdk ${{ matrix.java }}"
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
cache: gradle
- name: "validate gradle wrapper"
uses: gradle/wrapper-validation-action@v1
- name: "setup gradle"
uses: gradle/gradle-build-action@v2
- name: "gradle build and publish"
run: ./gradlew clean build publish publishAllPublicationsToHangar
env:
GRADLE_RELEASE: true
MAVEN_USERNAME: ${{ SECRETS.MAVEN_USERNAME }}
MAVEN_SECRET: ${{ SECRETS.MAVEN_SECRET }}
HANGAR_RELEASE_CHANGELOG: ${{ github.event.release.body }}
HANGAR_API_KEY: ${{ SECRETS.HANGAR_API_KEY }}
- name: upload artifacts
uses: actions/upload-artifact@v2
with:
name: message
path: build/libs/*.jar
retention-days: 365
# Release Artifacts
- name: release artifacts
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.release.tag_name }}
files: build/libs/*.jar