-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1001 Bytes
/
release_github.yaml
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
name: "Release GitHub"
on: [workflow_dispatch]
jobs:
github-release-job:
name: GitHub Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Java and Maven
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
- name: Cache Local Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Package Production
run: mvn generate-resources -D generate.sources.overwrite=true -P release
- name: Publish Package to GitHub
run: |
mvn --batch-mode --no-transfer-progress \
package \
-P deploy-github \
-D github.auth-token=$GITHUB_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}