-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (45 loc) · 1.39 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
53
54
name: Release
on:
push:
tags:
- "*"
jobs:
release:
name: Release Basics
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main branch
uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: temurin
- name: Get Tag name
uses: olegtarasov/[email protected]
- name: Update version in build.gradle.kts
run: |
GIT_REF=${{ steps.tagName.outputs.tag }} # not needed
echo "Project version adjusted to $GIT_TAG_NAME"
sed -i "s/version = \".*\"/version = \"$GIT_TAG_NAME\"/" build.gradle.kts
- name: Build zip archive with Gradle Wrapper
run: ./gradlew build zipDistribution --scan
- name: Generate checksum
run: |
cd build/dist
CHECKSUM=`sha256sum basics-$GIT_TAG_NAME.zip`
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: |
build/dist/basics-${{ env.GIT_TAG_NAME }}.zip
checksum.txt
draft: false
generate_release_notes: true
append_body: true
body_path: checksum_md.txt