-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.33 KB
/
gh-release.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: GitHub Release
on:
workflow_call:
inputs:
files:
required: false
type: string
outputs:
semvertag:
description: "The semantic versioning tag name created ('v' prefix)"
value: ${{ jobs.release.outputs.semvertag }}
semver:
description: "The semantic versioning name created (no prefix)"
value: ${{ jobs.release.outputs.semver }}
jobs:
release:
runs-on: ubuntu-latest
outputs:
semvertag: ${{ steps.getver.outputs.semvertag }}
semver: ${{ steps.getver.outputs.semver }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Build
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Build with Gradle
run: ./gradlew build
- name: Read version file
id: getver
run: |
VER=$(cat VERSION)
echo "VERSION=v$VER" >> $GITHUB_ENV
echo "semvertag=v$VER" >> $GITHUB_OUTPUT
echo "semver=$VER" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
tag_name: ${{ env.VERSION }}
files: ${{ inputs.files }}