Skip to content

Commit 211ffe1

Browse files
authored
Create release.yml
1 parent ff31409 commit 211ffe1

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
platform:
7+
type: choice
8+
description: Platform
9+
options:
10+
- fabric
11+
- forge
12+
- both
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
env:
18+
RELEASE_BUILD: true
19+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
20+
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
21+
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
22+
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup JDK 17
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: '17'
31+
distribution: temurin
32+
cache: gradle
33+
34+
- name: Validate Gradle Wrapper Integrity
35+
uses: gradle/wrapper-validation-action@v2
36+
37+
- name: Make Gradle wrapper executable
38+
run: chmod +x ./gradlew
39+
40+
- name: Build & Publish Fabric or Forge
41+
if: ${{ inputs.platform }} == "fabric" || ${{ inputs.platform }} == "forge"
42+
run: ./gradlew :${{ inputs.platform }}:build :${{ inputs.platform }}:publish :${{ inputs.platform }}:publishMods
43+
44+
- name: Build & Publish Both
45+
if: ${{ inputs.platform }} == both
46+
run: ./gradlew build :fabric:publish :forge:publish :fabric:publishMods :forge:publishMods

0 commit comments

Comments
 (0)