Files
optim/.github/actions/bump-pack/action.yml
T

44 lines
1.1 KiB
YAML

name: 'Bump Modpack Action | Action'
description: 'Bump a modpacks version'
inputs:
release-tag:
description: 'The release tag to bump the modpack to'
required: true
modpack:
description: 'Path to the modpack directory'
required: false
default: '.'
pack-file:
description: 'Path to the pack config file'
required: false
default: 'pack.toml'
branch:
description: "Branch, where to do the bump"
required: false
default: 'main'
runs:
using: 'composite'
steps:
# --- Checkout with the named branch
- name: Check Out Git Repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
# --- Use sed to set the version
- name: Set the Version
run: sed -i 's/version = "[^"]*"/version = "${{ inputs.release-tag }}"/' ${{ inputs.modpack }}/${{ inputs.pack-file }}
shell: bash
# --- Push the version
- name: Push The Updated Version
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore(${{ inputs.modpack }}): bump version to ${{ inputs.release-tag }}"