forked from dflib/jjava
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.25 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
name: 'create release'
on:
push:
tags:
- '[0-9]+.[0-9]+*'
permissions:
# allow a write access to GitHub Releases
contents: write
jobs:
prepare-release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.vars.outputs.tag }}
version: ${{ steps.vars.outputs.version }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout...
uses: actions/checkout@v4
- name: Set up JDK...
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Build...
run: mvn clean package
- name: Set version...
id: vars
run: |
RELEASE_TAG=${GITHUB_REF#refs/*/}
echo "tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "version=${RELEASE_TAG}" >> $GITHUB_OUTPUT
- name: Create release...
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.vars.outputs.tag }}
body: JJava ${{ steps.vars.outputs.version }} release
draft: true
prerelease: false
files: ./jjava/target/jjava-${{ steps.vars.outputs.version }}.zip
fail_on_unmatched_files: true