-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (39 loc) · 1.18 KB
/
bump.yaml
File metadata and controls
46 lines (39 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
# Bump the project's version
# This will generate a commit with the new version and a changelog entry
# This also tags the commit with the new version
name: Bump version
on:
workflow_dispatch:
inputs:
bump_rule:
type: choice
description: How to bump the project's version
options:
- patch
- minor
- major
# - prerelease
required: true
jobs:
bump_version:
name: "Bump version and create changelog"
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
env:
CI_COMMIT_EMAIL: "ci-runner@cmip-ref.invalid"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- uses: ./.github/actions/setup
with:
python-version: 3.12
- name: Create bump and changelog
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$CI_COMMIT_EMAIL"
# Bump
pixi run bump-my-version bump ${{ github.event.inputs.bump_rule }} -vv --tag --commit
git push && git push --tags