-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.09 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
name: Releases
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set RELEASE_VERSION
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Maven cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ env.CACHE_VERSION }}-${{ hashFiles('./.github/workflows/buildtools.sh') }}
restore-keys: |
${{ runner.os }}-maven-${{ env.CACHE_VERSION }}-
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
- name: Run BuildTools
run: |
bash ./.github/workflows/buildtools.sh
- name: Build
run: |
mvn package --batch-mode -Drevision=$RELEASE_VERSION
mv zip-plugin/target/zip-*.jar ./
- uses: ncipollo/release-action@v1
with:
artifacts: "zip-*.jar"
name: Release ${{ env.RELEASE_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}