-
Notifications
You must be signed in to change notification settings - Fork 43
69 lines (57 loc) · 1.92 KB
/
BuildAndRelease.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
65
66
67
68
69
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: Build and Release Installer
on:
workflow_call:
jobs:
build:
name: Build and Upload Artifact
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/[email protected]
with:
java-version: '21'
distribution: 'temurin'
- name: Fix Gradle Permission
run: chmod +x ./gradlew
- name: Setup Forge env
run: ./gradlew setup
- name: Shutdown Gradle # FG3+ dumb stuff hahahaha
run: ./gradlew --stop
- name: Build Forge Jar File
run: ./gradlew universalJar
- name: Build Forge Installer
run: ./gradlew installerJar
- name: Release Forge Installer
uses: actions/[email protected]
with:
name: installer
path: projects/cleanroom/build/libs/*-installer.jar
release:
name: Retrieve Artifact and Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
- name: Create GitHub Release
uses: KorewaLidesu/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: latest #TODO
commitish: ${{ github.ref.name }}
body: "" #TODO
name: 1.0.0.0 #TODO
prerelease: false
allow_override: true
gzip: false
files: |
./installer/*-installer.jar