-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.22 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
49
50
name: Publish package to GitHub Packages
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Set environmental variables
run: |
echo "GITHUB_USERNAME=$GITHUB_ACTOR" >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 21
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build package
run: ./gradlew build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
name: "Release ${{ github.ref_name }}"
prerelease: ${{ contains(github.event.head_commit.message, '[pre-release]') }}
files: build/libs/*.jar
generate_release_notes: true