-
-
Notifications
You must be signed in to change notification settings - Fork 57
173 lines (164 loc) · 6.13 KB
/
release.yml
File metadata and controls
173 lines (164 loc) · 6.13 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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
after-version:
description: 'Snapshot version after release'
required: true
# FIXME: Entire secret keys should not be inherited, Use specific set of secrets explicitly instead.
# See this issue to learn more: https://github.com/zizmorcore/zizmor/issues/360
jobs:
set-release-version:
uses: soulfiremc-com/SoulFire/.github/workflows/set-version.yml@main
permissions:
contents: write
with:
version: ${{ inputs.version }}
secrets: inherit
build:
needs: set-release-version
runs-on: blacksmith-2vcpu-ubuntu-2404
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
ref: ${{ github.ref }}
persist-credentials: false
- name: Set up JDK 25
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
with:
java-version: '25'
distribution: 'temurin'
check-latest: true
- name: Set up Gradle
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # 6.1.0
- name: Build with Gradle
run: ./gradlew build test --stacktrace --scan
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@bcae7115752d4ed746ff92feb666574428a79415 # 6.2.1
with:
mode: COMMIT
toTag: ${{ github.ref }}
configurationJson: |
{
"template": "#{{CHANGELOG}}",
"commit_template": "- [`#{{SHORT_MERGE_SHA}}`](https://github.com/soulfiremc-com/SoulFire/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 }}
- name: Release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # 3.0.0
with:
body: |
---
> [!IMPORTANT]
> These downloads are for users who want to host Dedicated Servers for SoulFire clients or use the CLI client of SoulFire.
> This is not the right download if you want to use the GUI client for SoulFire, which is recommended for most users.
> Instead you should look at the [SoulFireClient releases page](https://github.com/soulfiremc-com/SoulFireClient/releases).
---
${{ steps.github_release.outputs.changelog }}
tag_name: ${{ inputs.version }}
generate_release_notes: false
draft: false
prerelease: false
target_commitish: main
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
name: SoulFire ${{ inputs.version }}
preserve_order: true
files: |
dedicated-launcher/build/libs/SoulFireDedicated-${{ inputs.version }}.jar
client-launcher/build/libs/SoulFireCLI-${{ inputs.version }}.jar
- name: Announce new SoulFire release
uses: tsickert/discord-webhook@b217a69502f52803de774ded2b1ab7c282e99645 # 7.0.0
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
content: <@&850705047938793503> New SoulFire version released!
embed-title: SoulFire ${{ inputs.version }}
embed-description: SoulFire ${{ inputs.version }} has been released! Changelog and download can be found at https://github.com/soulfiremc-com/SoulFire/releases/tag/${{ inputs.version }}
embed-color: 3312063
embed-thumbnail-url: https://soulfiremc.com/logo.png
deploy-javadoc:
needs: build
uses: soulfiremc-com/SoulFire/.github/workflows/deploy-javadoc.yml@main
permissions:
contents: write
secrets: inherit
deploy-docker:
needs: build
uses: soulfiremc-com/SoulFire/.github/workflows/docker-deploy.yml@main
secrets: inherit
set-after-version:
needs: [ deploy-javadoc, deploy-docker ]
uses: soulfiremc-com/SoulFire/.github/workflows/set-version.yml@main
permissions:
contents: write
with:
version: ${{ inputs.after-version }}
secrets: inherit