forked from Tfarcenim/FabricFastBench
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1.12 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
name: Publish release
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build and publish with Gradle
run: ./gradlew build modrinth curseforge --continue --no-daemon
env:
BUILD_RELEASE: ${{github.event.prelease == false}}
MODRINTH_TOKEN: ${{secrets.MODRINTH}}
CURSEFORGE_TOKEN: ${{secrets.CURSEFORGE}}
CHANGELOG: ${{ github.event.release.body }}
- name: Upload build artifacts
if: always()
uses: AButler/[email protected]
with:
files: 'build/libs/*'
repo-token: ${{secrets.GITHUB_TOKEN}}