Skip to content

curseforge deployment #37

curseforge deployment

curseforge deployment #37

Workflow file for this run

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]
jobs:
build:
strategy:
matrix:
include:
- platform: modrinth
fileFormat: mrpack
mime: application/x-modrinth-modpack+zip
- platform: curseforge
fileFormat: zip
mime: application/zip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rrbutani/use-nix-shell-action@v1
with:
file: shell.nix
- name: Set Version for Artifact
run: deno run -A mod.ts set ${{ github.event.release.tag_name || '0.0.0' }}
- name: Export Modpack
run: packwiz ${{ matrix.platform }} export
- name: Rename to Release-Friendly Name
run: mv "Realliance Community-${{ github.event.release.tag_name || '0.0.0' }}.${{ matrix.fileFormat }}" "${{ matrix.platform }}_${{ github.event.release.tag_name || '0.0.0' }}.${{ matrix.fileFormat }}"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-export
path: ${{ matrix.platform }}_${{ github.event.release.tag_name || '0.0.0' }}.${{ matrix.fileFormat }}
- name: Upload to Release
if: github.event_name == 'release'
uses: JasonEtco/upload-to-release@master
with:
args: ./${{ matrix.platform }}_${{ github.event.release.tag_name || '0.0.0' }}.${{ matrix.fileFormat }} ${{ matrix.mime }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
publish-modrinth:
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Download Modrinth Artifact
uses: actions/download-artifact@v4
with:
name: modrinth-export
- name: List Artifact
run: ls -R
- name: Generate Changelog File
run: echo "${{ github.event.release.body }}" > CHANGELOG.release.md
- name: Publish to Modrinth
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: znT0Z7tA
modrinth-token: "${{ secrets.MODRINTH_TOKEN }}"
loaders: fabric
game-versions: "1.20.1"
changelog-file: CHANGELOG.release.md
files: "*.mrpack"
version: ${{ github.event.release.tag_name }}
version-type: release
publish-curseforge:
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Download Curseforge Artifact
uses: actions/download-artifact@v4
with:
name: curseforge-export
- name: List Artifact
run: ls -R
- name: Generate Changelog File
run: echo "${{ github.event.release.body }}" > CHANGELOG.release.md
- name: Publish to Curseforge
uses: Kir-Antipov/mc-publish@v3.3
with:
curseforge-id: 964927
curseforge-token: "${{ secrets.CURSEFORGE_TOKEN }}"
loaders: fabric
game-versions: "1.20.1"
changelog-file: CHANGELOG.release.md
files: "*.zip"
version: ${{ github.event.release.tag_name }}
version-type: release