-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb6a25
commit b3b1cbe
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish to Modrinth | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
environment: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: gradle/wrapper-validation-action@v1 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- name: Build with Gradle | ||
run: ./gradlew --build-cache build | ||
- name: Test with Gradle | ||
run: ./gradlew test | ||
- name: Publish release to Modrinth | ||
if: github.ref_name == 'main' | ||
env: | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
MODRINTH_CHANNEL: release | ||
run: ./gradlew modrinth | ||
- name: Publish dev to Modrinth | ||
if: github.ref_name == 'dev' | ||
env: | ||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | ||
MODRINTH_CHANNEL: development | ||
run: ./gradlew modrinth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters