fabulously-optimized/.github/workflows/auto-publish.yml
2024-04-18 20:50:33 +02:00

56 lines
1.7 KiB
YAML

name: Automatically publish to Modrinth and CurseForge
on:
release:
types: [published]
jobs:
publish-to-curseforge:
if: github.repository_owner == 'Fabulously-Optimized'
runs-on: ubuntu-22.04
environment: github-actions
steps:
- name: Download pack files
uses: robinraju/release-downloader@v1.10
id: download-files
with:
fileName: "*.zip"
latest: true
tarBall: false
zipBall: false
preRelease: true
- name: Publish to CurseForge
uses: Kir-Antipov/mc-publish@v3.3
with:
name: ${{ steps.download-files.outputs.tag_name }} for ${{ vars.MC_VERSION }}
curseforge-id: 396246
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-files: '*.zip'
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}
publish-to-modrinth:
if: github.repository_owner == 'Fabulously-Optimized'
runs-on: ubuntu-22.04
environment: github-actions
steps:
- name: Download pack files
uses: robinraju/release-downloader@v1.10
id: download-files
with:
fileName: "*.mrpack"
latest: true
tarBall: false
zipBall: false
preRelease: true
- name: Publish to Modrinth
uses: Kir-Antipov/mc-publish@v3.3
with:
name: ${{ steps.download-files.outputs.tag_name }} for ${{ vars.MC_VERSION }}
modrinth-id: 1KVo5zza
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-unfeature-mode: subset
files: '*.mrpack'
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}