-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (56 loc) · 1.69 KB
/
build.yml
File metadata and controls
57 lines (56 loc) · 1.69 KB
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
name: Build and Publish
on:
push:
branches:
- main
permissions:
id-token: "write"
contents: "write"
packages: "write"
pull-requests: "read"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: "temurin"
- name: Inject Version File
run: echo "${{ github.run_number }}" > src/main/resources/flint_version.txt
- name: Build with Gradle
run: ./gradlew build '-Pversion=${{ github.run_number }}'
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Flint
path: ./build/libs/Flint*.jar
- name: Publish Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ github.run_number }}"
prerelease: false
files: |
./build/libs/
- name: Publish to Modrinth
uses: cloudnode-pro/modrinth-publish@v2
with:
token: ${{ secrets.MODRINTH_TOKEN }}
project: dBv9so2c
name: "Flint v${{ github.run_number }}"
version: "v${{ github.run_number }}"
changelog: "${{ github.event.head_commit.message }}"
dependencies: |-
[{
"project_id": "P7dR8mSH",
"dependency_type": "required"
}]
loaders: |-
fabric
game-versions: |-
1.21.8
files: '["./build/libs/Flint-1.0.0.jar", "./build/libs/Flint-1.0.0-sources.jar"]'
primary-file: "Flint-1.0.0.jar"