-
-
Notifications
You must be signed in to change notification settings - Fork 19
178 lines (164 loc) · 5.45 KB
/
release.yml
File metadata and controls
178 lines (164 loc) · 5.45 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: Publish Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
after-version:
description: 'Snapshot version after release'
required: true
jobs:
set-release-version:
uses: AlexProgrammerDE/PistonQueue/.github/workflows/set-version.yml@main
with:
version: ${{ inputs.version }}
secrets: inherit
build:
needs: set-release-version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Build with Gradle
run: ./gradlew build test --stacktrace --scan
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v6
with:
mode: COMMIT
toTag: ${{ github.ref }}
configurationJson: |
{
"template": "#{{CHANGELOG}}",
"commit_template": "- [`#{{SHORT_MERGE_SHA}}`](https://github.com/AlexProgrammerDE/PistonQueue/commit/#{{MERGE_SHA}}) #{{TITLE}}",
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feat", "feature"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix", "bug"]
},
{
"title": "## 🏎️ Performance",
"labels": ["perf"]
},
{
"title": "## 🏗 Refactor",
"labels": ["refactor"]
},
{
"title": "## 📝 Documentation",
"labels": ["docs"]
},
{
"title": "## 🔨 Build",
"labels": ["build", "chore", "ci"]
},
{
"title": "## 💅 Style",
"labels": ["style"]
},
{
"title": "## 🧪 Tests",
"labels": ["test"]
},
{
"title": "## 💬 Other",
"labels": []
},
{
"title": "## 📦 Dependencies",
"labels": ["dependencies"]
}
],
"empty_template": "no changes",
"label_extractor": [
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)",
"on_property": "title",
"target": "$1"
}
],
"custom_placeholders": [
{
"name": "SHORT_MERGE_SHA",
"source": "MERGE_SHA",
"transformer": {
"pattern": "^([0-9a-f]{7})[0-9a-f]*$",
"target": "$1"
}
}
]
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: pistonqueue
modrinth-featured: true
modrinth-unfeature-mode: subset
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-tag: ${{ inputs.version }}
github-generate-changelog: false
github-draft: false
github-prerelease: false
github-commitish: main
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/libs/PistonQueue-${{ inputs.version }}.jar
build/libs/PistonQueue-Placeholder-${{ inputs.version }}.jar
name: PistonQueue ${{ inputs.version }}
version: ${{ inputs.version }}
version-type: release
changelog: ${{ steps.github_release.outputs.changelog }}
github-changelog: |
[](https://modrinth.com/plugin/pistonqueue/version/${{ inputs.version }})
${{ steps.github_release.outputs.changelog }}
loaders: |
bukkit
bungeecord
folia
paper
purpur
spigot
velocity
waterfall
game-versions: |
>=1.8.0
game-version-filter: releases
java: |
21
retry-attempts: 2
retry-delay: 10000
fail-mode: fail
- name: Discord Webhook Action
uses: tsickert/discord-webhook@v7.0.0
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
content: <@&850705047938793503> New PistonQueue version released!
embed-title: PistonQueue ${{ inputs.version }}
embed-description: PistonQueue ${{ inputs.version }} has been released! Changelog and download can be found at https://modrinth.com/plugin/pistonqueue/version/${{ inputs.version }}
embed-color: 16641028
embed-thumbnail-url: https://raw.githubusercontent.com/AlexProgrammerDE/PistonQueue/refs/heads/main/images/logo.png
set-after-version:
needs: build
uses: AlexProgrammerDE/PistonQueue/.github/workflows/set-version.yml@main
with:
version: ${{ inputs.after-version }}
secrets: inherit