Skip to content

6.2.1 for 1.21.1

6.2.1 for 1.21.1 #136

Workflow file for this run

name: Automatically publish to Modrinth and CurseForge
on:
release:
types: [published]
jobs:
publish-to-curseforge:
if: github.repository_owner == 'Fabulously-Optimized'
runs-on: ubuntu-24.04
environment: github-actions
steps:
- name: Download pack files
uses: robinraju/[email protected]
id: download-files
with:
fileName: "*.zip"
latest: true
tarBall: false
zipBall: false
preRelease: false
- name: Publish to CurseForge
uses: Kir-Antipov/[email protected]
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-24.04
environment: github-actions
permissions:
id-token: write
attestations: write
contents: write
steps:
- name: Clone Repo
uses: actions/checkout@v4
- name: Download packwiz
uses: actions/download-artifact@v4
with:
name: "Linux 64-bit x86"
github-token: ${{ secrets.GH_PAT }}
repository: packwiz/packwiz
run-id: 10602235974
- name: Export to packwiz
run: |
chmod +x ./packwiz
pushd Packwiz/${{ vars.MC_VERSION }}
../../packwiz modrinth export -o ../../Fabulously.Optimized-${{ github.ref_name }}.mrpack
popd
- name: Attest mrpack
id: attest-mrpack
uses: actions/attest-build-provenance@v1
with:
subject-path: Fabulously.Optimized-${{ github.ref_name }}.mrpack
- name: Copy and zip attestation
run: |
cp ${{ steps.attest-mrpack.outputs.bundle-path }} cosign-bundle.json
zip cosign-bundle.zip cosign-bundle.json
- name: Publish to Modrinth
uses: Kir-Antipov/[email protected]
with:
name: ${{ github.ref_name }} for ${{ vars.MC_VERSION }}
modrinth-id: 1KVo5zza
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-unfeature-mode: subset
files: |
Fabulously.Optimized-${{ github.ref_name }}.mrpack
cosign-bundle.zip
loaders: fabric
game-versions: ${{ vars.MC_VERSION }}
- name: Upload to Github
uses: Shopify/[email protected]
with:
name: Fabulously.Optimized-${{ github.ref_name }}.mrpack
path: Fabulously.Optimized-${{ github.ref_name }}.mrpack
repo-token: ${{ secrets.GITHUB_TOKEN }}