fix: print all items that need to be hidden from server to log for la… #90
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 Pipeline | |
# credit to mc-modpack-kit for the template | |
on: | |
push: | |
branches: | |
- main | |
env: | |
pack-file: "pack.toml" | |
default-release-modrinth: "true" | |
name: 'Create: Prepare to Dye' | |
slug: 'create-prepare-to-dye' | |
modrinth-url: 'https://modrinth.com/modpack/create-prepare-to-dye' | |
jobs: | |
tag_and_release: | |
runs-on: ubuntu-latest | |
outputs: | |
new_tag: ${{ steps.tag_version.outputs.new_tag }} | |
changelog: ${{ steps.tag_version.outputs.changelog }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/github-tag-action@v6.1 | |
with: | |
tag_prefix: '' | |
custom_release_rules: feat:minor:Features,fix:patch:Fixes,revert:patch:Reverted Changes,docs:patch:Documentation and Localization,test:patch:Tests and testing related changes,mods:patch:Modlist related changes,ci:patch:Continuous Integration | |
github_token: ${{ secrets.GH_TOKEN }} | |
- name: Create a GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: Release ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
token: ${{ secrets.GH_TOKEN }} | |
release: | |
needs: tag_and_release | |
strategy: | |
matrix: | |
include: | |
- platform: modrinth | |
file_suffix: mrpack | |
- platform: curseforge | |
file_suffix: zip | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install packwiz | |
uses: supplypike/setup-bin@v3 | |
with: | |
uri: "https://nightly.link/packwiz/packwiz/workflows/go/main/Linux%2064-bit%20x86.zip" | |
name: "packwiz" | |
version: "linux" | |
- name: Build args | |
id: build_args | |
run: echo 'name=${{ needs.tag_and_release.outputs.new_tag }}-${{ env.slug }} [forge][${{ matrix.platform }}]' >> $GITHUB_OUTPUT | |
# - name: Detect curseforge jars | |
# if: matrix.platform == 'curseforge' | |
# run: packwiz curseforge detect | |
- name: Build Modpack | |
run: packwiz ${{ matrix.platform }} export --output "${{ steps.build_args.outputs.name }}.${{ matrix.file_suffix }}" | |
- name: Upload Modpack ffile to GitHub Releases | |
run: | | |
gh release upload ${{ needs.tag_and_release.outputs.new_tag }} *.${{ matrix.file_suffix }} \ | |
--repo ${{ github.repository_owner }}/${{ github.event.repository.name }} \ | |
--clobber | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Publish to Modrinth | |
if: matrix.platform == 'modrinth' | |
uses: Kir-Antipov/mc-publish@v3.2 | |
with: | |
modrinth-id: ${{ vars.MODRINTH_ID }} | |
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | |
loaders: forge | |
game-versions: 1.19.2 | |
changelog: ${{ needs.tag_and_release.outputs.changelog }} | |
files: "*.mrpack" | |
version: ${{ needs.tag_and_release.outputs.new_tag }} | |
version-type: release | |
name: ${{ steps.build_args.outputs.name }} | |
- name: Update modrinth description to match reademe | |
if: matrix.platform == 'modrinth' | |
run: | | |
curl -X PATCH \ | |
-H "Authorization: ${{ secrets.MODRINTH_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d "$(cat README.md | jq -R -s '{body: .}')" \ | |
https://api.modrinth.com/v2/project/${{ vars.MODRINTH_ID }} | |
# - name: Publish to CurseForge | |
# if: matrix.platform == 'curseforge' | |
# uses: Kir-Antipov/mc-publish@v3.2 | |
# with: | |
# curseforge-id: ${{ vars.CF_ID }} | |
# curseforge-token: ${{ secrets.CF_API_TOKEN }} | |
# loaders: forge | |
# game-versions: 1.19.2 | |
# changelog: ${{ needs.tag_and_release.outputs.changelog }} | |
# files: "*.zip" | |
# version: ${{ needs.tag_and_release.outputs.new_tag }} | |
# version-type: release |