mirror of
https://github.com/darksaid98/optim.git
synced 2026-12-01 22:16:40 +00:00
refactor: add mc-modpack-kit template
This commit is contained in:
108 files changed
+773
No files matched your search
@@ -0,0 +1,43 @@
|
||||
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 }}"
|
||||
Reference in new issue
Block a user