-
Notifications
You must be signed in to change notification settings - Fork 8
87 lines (69 loc) · 2.35 KB
/
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
80
81
82
83
84
85
86
87
name: Release
on:
push:
branches:
- master
jobs:
release-please:
runs-on: ubuntu-latest
name: Release Please
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
steps:
- name: Release Please
uses: google-github-actions/release-please-action@v4
id: release-please
with:
config-file: .release-please/release-please-config.json
manifest-file: .release-please/.release-please-manifest.json
build-and-publish:
runs-on: ubuntu-latest
name: Build and Publish
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
steps:
- name: Parse Version
id: version
run: echo "version=$(echo "${{ needs.release-please.outputs.tag_name }}" | cut -c 2-)" >> "$GITHUB_OUTPUT"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: maven
- name: Build with Maven
run: mvn --batch-mode --update-snapshots package
- name: Rename artifact
run: mv target/*-jar-with-dependencies.jar ChatHub-${{ steps.version.outputs.version }}.jar
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Generate Latest Changelog
run: npx changelogithub --output LATEST_CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish
uses: Kir-Antipov/[email protected]
with:
version: ChatHub-${{ steps.version.outputs.version }}
modrinth-id: H3USaks7
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-id: 825508
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-tag: ${{ needs.release-please.outputs.tag_name }}
github-generate-changelog: false
github-token: ${{ secrets.GITHUB_TOKEN }}
files: |
ChatHub-${{ steps.version.outputs.version }}.jar
changelog-file: LATEST_CHANGELOG.md
loaders: |
velocity
game-versions: |
[1.12,)
game-version-filter: releases