-
Notifications
You must be signed in to change notification settings - Fork 34
38 lines (38 loc) · 1.22 KB
/
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
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: 'Release'
runs-on: 'ubuntu-latest'
steps:
- name: Set up Java
uses: actions/setup-java@5896cecc08fd8a1fbdfaf517e29b571164b031f7 # v4.2.0
with:
distribution: 'liberica'
java-version: 17
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # 3.1.0
with:
cache-read-only: false
- name: Build
run: ./gradlew build
- name: Get milestone from tag
id: milestone-from-tag
run: |
milestone=$(echo ${{ github.ref_name }} | cut -c 2-)
echo "milestone=$milestone" >> $GITHUB_OUTPUT
- name: Generate changelog
uses: ./
with:
milestone: ${{ steps.milestone-from-tag.outputs.milestone }}
- name: Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release create ${{ github.ref_name }} --notes-file=changelog.md build/libs/github-changelog-generator.jar