-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.24 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
name: PteroBot create release
on:
push:
tags:
- "v*"
jobs:
release:
name: Release PteroBot
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/[email protected]
with:
java-version: 17
distribution: temurin
cache: 'maven'
- name: Change version
id: version
env:
REF: ${{ github.ref }}
run: |
sed -i "s/canary/${REF:11}/g" pom.xml
echo "name=PteroBot-${REF:11}.jar" >> $GITHUB_OUTPUT
- name: Build PteroBot
run: mvn -B package --file pom.xml
- name: Generate checksum
run: |
cd target/
CHECKSUM=`sha256sum ${{ steps.version.outputs.name }}`
cd ..
echo $CHECKSUM > checksum.txt
echo -e "### SHA256 Checksum\n\`\`\`\n$CHECKSUM\n\`\`\`" > checksum_md.txt
- name: Create release
uses: softprops/[email protected]
with:
files: |
target/${{ steps.version.outputs.name }}
checksum.txt
draft: true
generate_release_notes: true
append_body: true
body_path: checksum_md.txt