Skip to content

feat: test artifact #26

feat: test artifact

feat: test artifact #26

Workflow file for this run

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'
jobs:
release:
runs-on: ubuntu-latest
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: ''
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 }}
artifacts: |
${{ env.pack-file }}
# --- Release please
# Creates and manages the prs and releases
# - name: Perform Release with Release Please
# id: release-please
# uses: google-github-actions/release-please-action@v3
# with:
# token: ${{ secrets.GH_TOKEN }}
# release-type: simple
# package-name: ${{ env.name }}
# changelog-types: >
# [{"type":"feat","section":"Features","hidden":false},
# {"type":"fix","section":"Fixes","hidden":false},
# {"type":"mod","section":"Modlist Changes","hidden":false},
# {"type":"update","section":"Mod Updates","hidden":false},
# {"type":"chore","section":"Miscellaneous","hidden":true}]
# extra-files: |
# ${{ env.pack-file }}
# # --- Parse version from PR Title when creating PR's
# # Had to do this cause like to bump on the release pleae branch
# # The tests for the shitty Regex can be found here: https://regexr.com/7lb8e
# - name: Parse tag from PR title
# uses: actions-ecosystem/action-regex-match@v2
# id: version
# with:
# text: ${{ fromJson(steps.release-please.outputs.pr).title }}
# regex: '(?<=\s)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$'
# if: ${{ steps.release-please.outputs.pr != '' }}
# # --- Checkout the git repo
# # Remembed to do this AFTER release please
# - name: Check Out Git Repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# # --- Bump version
# # Now we should use the parsed release to bump the version on the files on the release please branch
# - name: Bump Version
# uses: ./.github/actions/bump-pack
# with:
# release-tag: ${{ steps.version.outputs.match }}
# modpack: ${{ matrix.modpack }}
# branch:
# ${{ fromJson(steps.release-please.outputs.pr).headBranchName }}
# if: ${{ steps.release-please.outputs.pr != '' }}
# # --- Get latest tag
# # Should probably be switched to use the release please tag but whatever
# - name: Get Latest tag
# id: tag
# uses: WyriHaximus/github-action-get-previous-tag@v1
# if: ${{ steps.release-please.outputs.releases_created }}
# # --- Handle the configs
# - name: Parse Pack File
# id: parse
# uses: ./.github/actions/parse
# with:
# modpack: ${{ matrix.modpack }}
# if: ${{ steps.release-please.outputs.releases_created }}
# - name: Set Mod Vendors
# id: set-mod-vendors
# run: |
# [[ ! -z "${{ secrets.CURSEFORGE_TOKEN }}" && ! -z "${{ secrets.CURSEFORGE_ID }}" ]] && echo "curseforge=true" >> $GITHUB_OUTPUT || echo "curseforge=false" >> $GITHUB_OUTPUT
# [[ ! -z "${{ secrets.MODRINTH_TOKEN }}" && ! -z "${{ secrets.MODRINTH_ID }}" ]] && echo "modrinth=true" >> $GITHUB_OUTPUT || echo "modrinth=false" >> $GITHUB_OUTPUT
# shell: bash
# if: ${{ steps.release-please.outputs.releases_created }}
# # --- Build an release
# - name: Build Modpack
# uses: ./.github/actions/build
# with:
# modpack: ${{ matrix.modpack }}
# release-tag: ${{ steps.tag.outputs.tag }}
# build-modrinth: ${{ env.default-release-modrinth }}
# build-curse: ${{ env.default-release-curseforge }}
# if: ${{ steps.release-please.outputs.releases_created }}
# # --- Release
# - name: Release Modpack to Vendors
# uses: ./.github/actions/release
# with:
# modpack: ${{ matrix.modpack }}
# release-tag: ${{ steps.tag.outputs.tag }}
# loader: ${{ steps.parse.outputs.loader }}
# game-version: ${{ steps.parse.outputs.game-version }}
# upload-modrinth: ${{ steps.set-mod-vendors.outputs.modrinth }}
# upload-curse: ${{ steps.set-mod-vendors.outputs.curseforge }}
# MODRINTH_ID: ${{ secrets.MODRINTH_ID }}
# MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
# CURSEFORGE_ID: ${{ secrets.CURSEFORGE_ID }}
# CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
# if: |
# steps.release-please.outputs.releases_created &&
# (steps.set-mod-vendors.outputs.modrinth || steps.set-mod-vendors.outputs.curseforge)