-
-
Notifications
You must be signed in to change notification settings - Fork 27
43 lines (37 loc) · 1004 Bytes
/
Copy pathmodrinth.yml
File metadata and controls
43 lines (37 loc) · 1004 Bytes
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
name: Modrinth Publish
on:
push:
branches:
- master
# Allow manual triggering from the GitHub UI
workflow_dispatch:
# Trigger when a new release is created
release:
types: [created]
jobs:
publish:
if: github.repository_owner == 'SamB440'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Publish to Modrinth
run: ./gradlew modrinth
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
- name: Capture build artifacts
uses: actions/upload-artifact@v7
with:
name: Artifacts
path: |
**/build/libs/
*/build/libs/