55 inputs :
66 bump_rule :
77 type : choice
8- description : How to bump the project's version (see https://github.com/carstencodes/pdm-bump#usage )
8+ description : How to bump the project's version (see https://docs.astral.sh/uv/reference/cli/#uv-version )
99 options :
10- - no-pre-release
11- # no micro because we always sit on a pre-release in main,
12- # so we would always use no-pre-release instead of micro
13- # - micro
10+ - patch
1411 - minor
1512 - major
16- - " pre-release --pre alpha"
17- - " pre-release --pre beta"
18- - " pre-release --pre release-candidate"
13+ - stable
14+ - alpha
15+ - beta
16+ - rc
17+ - post
18+ - dev
1919 required : true
2020
2121jobs :
2222 bump_version :
2323 name : " Bump version and create changelog"
2424 if : " !startsWith(github.event.head_commit.message, 'bump:')"
25- runs-on : ubuntu-latest
25+ strategy :
26+ matrix :
27+ os : [ "ubuntu-latest" ]
28+ python-version : [ "3.11" ]
29+ runs-on : " ${{ matrix.os }}"
2630 env :
2731 CI_COMMIT_EMAIL : " ci-runner@openscm-calibration.invalid"
2832 steps :
@@ -32,36 +36,27 @@ jobs:
3236 fetch-depth : 0
3337 token : " ${{ secrets.PERSONAL_ACCESS_TOKEN }}"
3438
35- - name : Setup PDM
36- uses : pdm-project/setup-pdm@v4
37- with :
38- python-version : " 3.9"
39-
40- - name : Install pdm-bump
41- run : |
42- pdm self add pdm-bump
43-
4439 - uses : ./.github/actions/setup
4540 with :
4641 python-version : ${{ matrix.python-version }}
47- pdm -dependency-install-flags : " -G dev"
42+ uv -dependency-install-flags : " --all-extras --group dev"
4843
4944 - name : Create bump and changelog
5045 run : |
5146 git config --global user.name "$GITHUB_ACTOR"
5247 git config --global user.email "$CI_COMMIT_EMAIL"
5348
54- BASE_VERSION=`sed -ne 's/^version = "\([0-9\.a ]*\)"/\1/p' pyproject.toml`
49+ BASE_VERSION=`sed -ne 's/^version = "\([0-9\.post ]*\)"/\1/p' pyproject.toml`
5550 echo "Bumping from version $BASE_VERSION"
5651
5752 # Bump
58- pdm bump ${{ github.event.inputs.bump_rule }}
53+ uv version -- bump ${{ github.event.inputs.bump_rule }}
5954
60- NEW_VERSION=`sed -ne 's/^version = "\([0-9\.a ]*\)"/\1/p' pyproject.toml`
55+ NEW_VERSION=`sed -ne 's/^version = "\([0-9\.]*\)"/\1/p' pyproject.toml`
6156 echo "Bumping to version $NEW_VERSION"
6257
6358 # Build CHANGELOG
64- pdm run towncrier build --yes --version v$NEW_VERSION
59+ uv run towncrier build --yes --version v$NEW_VERSION
6560
6661 # Commit, tag and push
6762 git commit -a -m "bump: version $BASE_VERSION -> $NEW_VERSION"
@@ -70,12 +65,12 @@ jobs:
7065
7166 # Bump to alpha (so that future commits do not have the same
7267 # version as the tagged commit)
73- BASE_VERSION=`sed -ne 's/^version = "\([0-9\.a ]*\)"/\1/p' pyproject.toml`
68+ BASE_VERSION=`sed -ne 's/^version = "\([0-9\.]*\)"/\1/p' pyproject.toml`
7469
7570 # Bump to pre-release of next version
76- pdm bump pre-release --pre alpha
71+ uv version --bump post
7772
78- NEW_VERSION=`sed -ne 's/^version = "\([0-9\.a ]*\)"/\1/p' pyproject.toml`
73+ NEW_VERSION=`sed -ne 's/^version = "\([0-9\.post ]*\)"/\1/p' pyproject.toml`
7974 echo "Bumping version $BASE_VERSION > $NEW_VERSION"
8075
8176 # Commit and push
0 commit comments