File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support
4+ # documentation.
5+ # This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6+ # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7+
8+ name : Publish Mod
9+
10+ on :
11+ push :
12+ branches :
13+ - release/*
14+
15+ jobs :
16+ build :
17+
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+
22+ steps :
23+ - uses : actions/checkout@v4
24+ - name : Set up JDK 21
25+ uses : actions/setup-java@v4
26+ with :
27+ java-version : ' 21'
28+ distribution : ' temurin'
29+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
30+ settings-path : ${{ github.workspace }} # location for the settings.xml file
31+
32+ - name : Setup Gradle
33+ uses : gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
34+
35+ - name : Build with Gradle
36+ run : ./gradlew build
37+
38+ # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
39+ # the publishing section of your build.gradle
40+ - name : Publish Mods
41+ run : ./gradlew publishMods
42+ env :
43+ MODRINTH_TOKEN : ${{ secrets.MODRINTH_TOKEN }}
44+ CURSEFORGE_TOKEN : ${{ secrets.CURSEFORGE_TOKEN }}
45+ GITHUB_TOKEN : ${{ secrets.GTH_TOKEN }}
You can’t perform that action at this time.
0 commit comments