-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.54 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
# Prepares, builds and publishes new releases
name: Release
# On changes to release branches
on:
push:
branches:
- fabric/1.18
- master
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: 🙌 Prepare release
id: release-please
uses: GoogleCloudPlatform/release-please-action@v3
with:
command: manifest
config-file: .github/release-please.json
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
publish:
name: Publish
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.release_created }}
steps:
- name: ✨ Checkout repository
uses: actions/checkout@v2
- name: ☕ Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: adopt
- name: 🐘 Set up Gradle
uses: gradle/gradle-build-action@v2
- name: 📢 Publish new release
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
- name: 📦 Upload artifacts
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release.outputs.tag_name }}
files: '**/build/libs/*'
token: ${{ secrets.GITHUB_TOKEN }}