Publish action #2
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: Publish on GitHub, CurseForge and Modrinth | |
on: | |
workflow_dispatch: | |
branches: [ "main" ] | |
inputs: | |
version: | |
description: 'Mod Version' | |
required: true | |
type: string | |
env: | |
MINECRAFT_VERSION: 1.19.2 | |
JAVA_VERSION: 17 | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: 'temurin' | |
- shell: bash | |
env: | |
VERSION: ${{ inputs.version }} | |
run: | | |
echo "$VERSION" > version | |
mkdir -p ~/.gradle/caches/fabric-loom/assets | |
- name: Setup and Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: clean runData build | |
- uses: GuillaumeFalourd/[email protected] | |
with: | |
commit_message: "ci: bump version" | |
- uses: Kir-Antipov/[email protected] | |
with: | |
modrinth-id: TKB6INcv | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
curseforge-id: 401955 | |
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
name: ars_artifice-${{ env.MINECRAFT_VERSION }}-${{ inputs.version }} | |
version: ${{ inputs.version }} | |
game-versions: | | |
${{ env.MINECRAFT_VERSION }} | |
version-resolver: exact |