Add automatic publishing to Modrinth and CurseForge (#467)

* Add automatic publishing to Modrinth

* Add automatic publishing to Modrinth

* Add automatic CurseForge publishing

* Update .github/workflows/modrinth-publish.yml

Co-authored-by: Madis Otenurm <Madis0@users.noreply.github.com>

* Fixes

* Split modrinth and curseforge to separate jobs

* :oof:

Co-authored-by: Madis Otenurm <Madis0@users.noreply.github.com>
This commit is contained in:
osfanbuff63 2022-09-12 13:17:20 -04:00 committed by GitHub
parent ad24be0338
commit f7d8a824f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

35
.github/workflows/modrinth-publish.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Automatically publish to Modrinth and CurseForge
on:
release:
types: [published]
jobs:
publish-to-modrinth:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Download the pack files
run: curl -sLo "MR_Fabulously Optimized-${{ steps.get_version.outputs.version }}.mrpack" https://github.com/Fabulously-Optimized/fabulously-optimized/releases/download/v${{ steps.get_version.outputs.version }}/MR_Fabulously.Optimized-${{ steps.get_version.outputs.version }}.mrpack
- name: Publish to Modrinth
uses: Kir-Antipov/mc-publish@v3.2
with:
modrinth-id: 1KVo5zza
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-unfeature-mode: subset
modrinth-files: '*.mrpack'
publish-to-curseforge:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Download the pack files
run: curl -sLo "Fabulously Optimized-${{ steps.get_version.outputs.version }}.zip" https://github.com/Fabulously-Optimized/fabulously-optimized/releases/download/v${{ steps.get_version.outputs.version }}/Fabulously.Optimized-${{ steps.get_version.outputs.version }}.zip
- name: Publish to CurseForge
uses: Kir-Antipov/mc-publish@v3.2
with:
curseforge-id: 396246
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-files: '*.zip'