forked from Donkie/Spoolman
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.18 KB
/
trigger-release.yml
File metadata and controls
49 lines (42 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Release Trigger
on:
workflow_dispatch:
inputs:
bump:
type: choice
description: Version to bump
required: true
default: minor
options:
- micro
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v5.2.0
with:
python-version: "3.9"
- name: Install node
uses: actions/setup-node@v4.0.3
with:
node-version: '20'
- name: Setup PDM
run: |
pip install pdm pdm-bump
- 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"
pdm run bump ${{ 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