mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Release Trigger
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
bump:
|
|
type: choice
|
|
description: Version to bump
|
|
required: true
|
|
default: minor
|
|
options:
|
|
- micro
|
|
- minor
|
|
- major
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
bump-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
token: ${{ secrets.PAT }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
version: "0.9.26"
|
|
|
|
- name: "Set up Python"
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
|
|
- name: Install node
|
|
uses: actions/setup-node@v4.0.3
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Bump version
|
|
run: |
|
|
git config --global user.name "${GITHUB_ACTOR}"
|
|
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
|
|
uv run bump2version ${{ github.event.inputs.bump }}
|
|
|
|
- name: Push
|
|
run: |
|
|
latest_tag=$(git describe --tags --abbrev=0)
|
|
echo "Pushing branch master and tag $latest_tag"
|
|
git push --atomic origin master $latest_tag
|