-
Notifications
You must be signed in to change notification settings - Fork 49
49 lines (39 loc) · 1.34 KB
/
publish.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
name: Publish Project
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # any SemVer tag, e.g. v1.2.3
env:
# link to the changelog with a format code for the version
CHANGELOG_LOCATION: "Changelog is available [here](https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }})"
# type of release
RELEASE_TYPE: 'beta'
concurrency:
group: publish-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write # needed to create GitHub releases
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Build
uses: ./.github/actions/build_setup
- name: Build Project
run: ./gradlew build --warning-mode all --build-cache
- name: Publish to GitHub
uses: softprops/action-gh-release@v2
with:
files: "build/libs/*.jar"
generate_release_notes: true
fail_on_unmatched_files: true
- name: Publish to Curseforge
env:
CURSEFORGE_API_KEY: "${{ secrets.CURSEFORGE_API_KEY }}"
CURSEFORGE_PROJECT_ID: "846224"
CHANGELOG_LOCATION: "${{ env.CHANGELOG_LOCATION }}"
RELEASE_TYPE: "${{ env.RELEASE_TYPE }}"
run: ./gradlew curseforge --warning-mode all --build-cache