Release Modpack #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Modpack | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "模組包路徑" | |
required: true | |
type: choice | |
options: | |
- "1.19.4" | |
- "1.20.1" | |
pre-release: | |
description: "是否使用測試版發佈" | |
required: false | |
type: boolean | |
permissions: | |
contents: write | |
jobs: | |
modpack: | |
uses: ./.github/workflows/packwiz-action.yml | |
if: | | |
github.repository == 'snowlinouo/SnowLinModPack' | |
with: | |
path: ${{ inputs.version }} | |
release: | |
needs: [ modpack ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking Repostiory | |
uses: actions/checkout@v3 | |
- name: Download Modpack | |
uses: actions/download-artifact@v3 | |
with: | |
name: Modpacks-Artifact | |
- name: GitHub Pre Release | |
if: ${{ inputs.pre-release }} | |
uses: ncipollo/release-action@v1 | |
with: | |
name: SnowLinModPack Beta ${{ needs.modpack.outputs.pack_version }} (${{ needs.modpack.outputs.mc_version }}) | |
tag: ${{ needs.modpack.outputs.pack_version }}-${{ needs.modpack.outputs.mc_version }}-beta | |
allowUpdates: true | |
prerelease: true | |
artifacts: | | |
*.mrpack | |
*.zip | |
checksums.txt | |
bodyFile: "./.github/template/changelog-beta.md" | |
- name: GitHub Release | |
if: ${{ ! inputs.pre-release }} | |
uses: ncipollo/release-action@v1 | |
with: | |
name: SnowLinModPack ${{ needs.modpack.outputs.pack_version }} (${{ needs.modpack.outputs.mc_version }}) | |
tag: ${{ needs.modpack.outputs.pack_version }}-${{ needs.modpack.outputs.mc_version }} | |
allowUpdates: false | |
prerelease: false | |
artifacts: | | |
*.mrpack | |
*.zip | |
checksums.txt | |
bodyFile: "./.github/template/${{ inputs.version }}-changelog.md" | |
- name: Modrinth Release | |
if: ${{ ! inputs.pre-release }} | |
uses: Kir-Antipov/mc-publish@v3.3 | |
with: | |
modrinth-id: JHAIU82Q | |
modrinth-unfeature-mode: subset | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
changelog-file: "./.github/template/${{ inputs.version }}-changelog.md" | |
loaders: fabric | |
game-versions: ${{ needs.modpack.outputs.mc_version }} | |
name: SnowLinModPack ${{ needs.modpack.outputs.pack_version }} (${{ needs.modpack.outputs.mc_version }}) | |
version: ${{ needs.modpack.outputs.pack_version }}-${{ needs.modpack.outputs.mc_version }} | |
version-type: release | |
files: | | |
*.mrpack |