Skip to content

Commit

Permalink
Use new publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiDragon committed Apr 28, 2024
1 parent 3000518 commit 9eb4c91
Showing 1 changed file with 14 additions and 55 deletions.
69 changes: 14 additions & 55 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,20 @@ on:
required: true
type: choice
options: ["release", "beta", "alpha"]
minecraft-versions:
description: Overrides for supported versions
required: false
type: string

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Gradle Caching
uses: burrunan/gradle-cache-action@v1
with:
gradle-distribution-sha-256-sum-warning: false

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Read mod version
id: versions
uses: christian-draeger/read-properties@1.1.0
with:
path: gradle.properties
properties: "mod_version minecraft_version"

- name: Read changelog
uses: juliangruber/read-file-action@v1
id: changelog
with:
path: "./changelog/${{ steps.versions.outputs.mod_version }}+${{ steps.versions.outputs.minecraft_version }}.md"

- name: Publish
uses: Kir-Antipov/mc-publish@v3.2
with:
name: "v${{ steps.versions.outputs.mod_version }} [${{ steps.versions.outputs.minecraft_version }}]"
version: ${{ steps.versions.outputs.mod_version }}+mc.${{ steps.versions.outputs.minecraft_version }}
version-type: ${{ inputs.version-type }}

loaders: fabric quilt
java: 17 18 19 20

game-versions: ${{ steps.versions.outputs.minecraft_version }}
changelog: ${{ steps.changelog.outputs.content }}

modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-id: j9JARqmz
modrinth-featured: false

curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-id: 596911
uses: MattiDragon/MattiDragon/.github/workflows/publish-mc-mod.yaml@275ad65025060abab92dd3a080dae735e89565e7
with:
version-type: ${{ inputs.version-type }}
minecraft-versions: ${{ inputs.minecraft-versions }}
jitpack-safe-version: true
modrinth-id: j9JARqmz
curseforge-id: 596911
secrets:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

0 comments on commit 9eb4c91

Please sign in to comment.