generated from architectury/architectury-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (40 loc) · 1.39 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
# Taken from Leuokcyte (https://github.com/NucleoidMC/leukocyte/blob/main/.github/workflows/release.yml)
name: Release
on:
release:
types:
- published
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: |
~/.gradle/loom-cache
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build and publish with Gradle
run: ./gradlew build fabric:modrinth fabric:curseforge forge:modrinth forge:curseforge --stacktrace
env:
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
# MAVEN_URL: ${{ secrets.MAVEN_URL }}
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: Upload GitHub release
uses: AButler/[email protected]
with:
files: 'fabric/build/libs/*-fabric.jar;forge/build/libs/*-forge.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}