Skip to content

Commit 1a76490

Browse files
committed
action
1 parent 59e66b9 commit 1a76490

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: build
2+
on: [pull_request, push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: checkout repository
9+
uses: actions/checkout@v6
10+
11+
- name: setup jdk 21
12+
uses: actions/setup-java@v5
13+
with:
14+
java-version: 21
15+
distribution: 'temurin'
16+
17+
- name: build
18+
run: |
19+
chmod +x ./gradlew
20+
./gradlew build
21+
22+
- name: capture build artifact
23+
uses: actions/upload-artifact@v7
24+
with:
25+
path: build/libs/*
26+
archive: false
27+
28+
29+
- name: publish
30+
if: startsWith(github.ref, 'refs/tags/')
31+
uses: apehum/mc-publish@v1.2
32+
with:
33+
modrinth-id: 7FoirOzn
34+
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
35+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)