Skip to content

v4 upload

v4 upload #22

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: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-export
path: Realliance Community-${{ github.event.release.tag_name || '0.0.0' }}.${{ matrix.fileFormat }}
- name: Rename to Release-Friendly Name
if: github.event_name == 'release'
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 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: Upload to Modrinth
uses: cloudnode-pro/modrinth-publish@1.0.0
with:
token: "${{ secrets.MODRINTH_TOKEN }}"
project: realliance-community
file: "modrinth-export/Realliance Community-${{ github.event.release.tag_name }}.mrpack"
changelog: "${{ github.event.release.body }}"
loaders: "fabric"