forked from chr56/Phonograph_Plus
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 1.84 KB
/
stable_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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: stable_release
on:
push:
tags:
- "v**"
paths-ignore:
- '.github/**'
jobs:
changelog:
name: Generate Changelogs
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Grant Execute Permission for Gradlew
run:
chmod +x gradlew
- name: Generate Changelog Markdown
run: |
# Prepare
./gradlew tools:changelog-generator:classes
# generate changelog
./gradlew tools:changelog-generator:GenerateGithubReleaseNote
./gradlew tools:changelog-generator:GenerateEscapedMarkdownReleaseNote
- name: Upload Changelogs
uses: actions/upload-artifact@v4
with:
name: Changelogs
path: |
GitHubReleaseNote.md
EscapedReleaseNote.md
retention-days: 1
release:
name: Create Stable Release Template
runs-on: ubuntu-22.04
permissions:
contents: write
needs:
- changelog
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Changelogs
uses: actions/download-artifact@v4
with:
pattern: Changelogs
merge-multiple: true
- name: Create Stable Release Template
uses: softprops/action-gh-release@v1
id: release_github
if: startsWith(github.ref, 'refs/tags/v')
with:
token: ${{ secrets.TOKEN }}
name: "${{ github.ref_name }}"
draft: true
tag_name: ${{ github.ref }}
body_path: ./GitHubReleaseNote.md