Skip to content

Publish Jar

Publish Jar #2

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Publish Jar
on:
workflow_dispatch:
env:
JAVA_VERSION: 17
permissions:
contents: write
jobs:
build:
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: 17
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Build
run: ./gradlew clean build
- name: Publish Forge
uses: Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: "${{vars.CURSEFORGE_ID}}"
curseforge-token: "${{secrets.CURSEFORGE_TOKEN}}"
modrinth-id: "${{vars.MODRINTH_ID}}"
modrinth-token: "${{secrets.MODRINTH_TOKEN}}"
github-token: "${{secrets.PUBLISH_TOKEN}}"
changelog-file: CHANGELOG.md
java: "${{env.JAVA_VERSION}}"
files: forge/build/libs/!(*-dev|*-sources|*-javadoc|*-shadow).jar
fail-mode: warn
- name: Publish Fabric
uses: Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: "${{vars.CURSEFORGE_ID}}"
curseforge-token: "${{secrets.CURSEFORGE_TOKEN}}"
modrinth-id: "${{vars.MODRINTH_ID}}"
modrinth-token: "${{secrets.MODRINTH_TOKEN}}"
github-token: "${{secrets.PUBLISH_TOKEN}}"
changelog-file: CHANGELOG.md
java: "${{env.JAVA_VERSION}}"
files: fabric/build/libs/!(*-dev|*-sources|*-javadoc|*-shadow).jar
fail-mode: warn