FabricPublish #1
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
name: FabricPublish | |
on: | |
workflow_dispatch: | |
workflow_call: | |
env: | |
JAVA_VERSION: 21 | |
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
MODRINTH_ID: DfZhZ0LX | |
CURSEFORGE_ID: 651887 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Environment Variables | |
run: env | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Make Gradle Wrapper Executable | |
run: chmod +x gradlew | |
- name: Set Environment Variables from Gradle | |
run: ./gradlew printEnv | |
- name: Build | |
run: ./gradlew fabric:build | |
- name: Publish (Modrinth & CurseForge) | |
uses: Kir-Antipov/[email protected] | |
with: | |
modrinth-id: ${{ env.MODRINTH_ID }} | |
modrinth-token: ${{ env.MODRINTH_TOKEN }} | |
curseforge-id: ${{ env.CURSEFORGE_ID }} | |
curseforge-token: ${{ env.CURSEFORGE_TOKEN }} | |
files: | | |
fabric/build/libs/!(*-@(dev|sources|javadoc)).jar | |
name: ${{ env.RELEASE_NAME }} | |
version: ${{ env.MOD_VERSION }} | |
version-type: 'release' | |
changelog-file: CHANGELOG.md | |
game-versions: ${{ env.GAME_VERSIONS }} | |
loaders: | | |
fabric | |
quilt | |
dependencies: | | |
fabric-api | |
java: ${{ env.JAVA_VERSION }} |