Skip to content

Commit e879ca9

Browse files
Update release.yml
1 parent a9d257b commit e879ca9

File tree

2 files changed

+26
-44
lines changed

2 files changed

+26
-44
lines changed

.github/release-drafter.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,10 @@ version-resolver:
4848
- "patch"
4949
default: patch
5050

51-
exclude-contributors:
52-
- "robbievanleeuwen"
53-
5451
# Custom text at start of release
5552
header: >
5653
57-
This release contains several important bug fixes and dependency updates.
58-
59-
Python 3.9 support is dropped ahead of the upcoming 3.13 release. Python 3.13 support
60-
will be added once all the core upstream dependencies support 3.13.
61-
62-
A bug in the `CompoundGeometry` offset dilation algorithm was fixed by @connorferster,
63-
a live stream of this fix can be watched [here](https://www.youtube.com/live/hSfsojAAJjc?si=Zuwn7Mr6zXS1wHFF).
64-
65-
Most importantly a critical bug in the plastic moment calculation was found and fixed,
66-
see issue 460. Note that this bug affected plastic moment calculations for composite
67-
sections only, the plastic centroid calculation and geometric-only analyses were
68-
unaffected.
54+
xxx ?Add contributors?
6955
7056
template: |
7157

.github/workflows/release.yml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,69 @@ on:
44
push:
55
branches:
66
- master
7+
# TODO: disable when confirmed working
8+
pull_request:
9+
types: [opened, reopened, synchronize]
10+
11+
env:
12+
UV_VERSION: "0.4.26"
13+
DEFAULT_PYTHON_VERSION: "3.12"
714

815
jobs:
916
release:
1017
name: Release
1118
runs-on: ubuntu-latest
19+
1220
steps:
1321
- name: Check out the repository
1422
uses: actions/checkout@v4
1523
with:
1624
fetch-depth: 2
1725

18-
- name: Set up Python
19-
uses: actions/setup-python@v5
26+
- name: Install uv version ${{ env.UV_VERSION }}
27+
uses: astral-sh/setup-uv@v3
2028
with:
21-
python-version: "3.12"
29+
version: ${{ env.UV_VERSION }}
2230

23-
- name: Upgrade pip
24-
run: |
25-
pip install --constraint=.github/workflows/constraints.txt pip
26-
pip --version
31+
- name: Install python ${{ env.DEFAULT_PYTHON_VERSION }} using uv
32+
run: uv python install ${{ env.DEFAULT_PYTHON_VERSION }}
2733

28-
- name: Install Poetry
29-
run: |
30-
pip install --constraint=.github/workflows/constraints.txt poetry
31-
poetry --version
32-
33-
- name: Check if there is a parent commit
34-
id: check-parent-commit
35-
run: |
36-
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
34+
- name: Get previous commit SHA
35+
run: echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_ENV
3736

3837
- name: Detect and tag new version
3938
id: check-version
40-
if: steps.check-parent-commit.outputs.sha
41-
uses: salsify/action-detect-and-tag-new-version@v2.0.3
39+
if: ${{ env.sha }}
40+
uses: salsify/action-detect-and-tag-new-version@v2
4241
with:
43-
version-command: |
44-
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
42+
version-command: uvx hatch version
4543

46-
- name: Bump version for developmental release
44+
- name: Bump version for dev release
4745
if: "! steps.check-version.outputs.tag"
4846
run: |
49-
poetry version patch &&
50-
version=$(poetry version | awk '{ print $2 }') &&
51-
poetry version $version.dev.$(date +%s)
47+
VERSION=$(uvx hatch version)
48+
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version $VERSION.dev.$(date +%s)
5249
5350
- name: Build package
54-
run: |
55-
poetry build --ansi
51+
run: uv build
5652

5753
- name: Publish package on PyPI
5854
if: steps.check-version.outputs.tag
59-
uses: pypa/gh-action-pypi-publish@v1.10.3
55+
uses: pypa/gh-action-pypi-publish@v1
6056
with:
6157
user: __token__
6258
password: ${{ secrets.PYPI_API_TOKEN }}
6359

6460
- name: Publish package on TestPyPI
6561
if: "! steps.check-version.outputs.tag"
66-
uses: pypa/gh-action-pypi-publish@v1.10.3
62+
uses: pypa/gh-action-pypi-publish@v1
6763
with:
6864
user: __token__
6965
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
7066
repository_url: https://test.pypi.org/legacy/
7167

7268
- name: Publish the release notes
73-
uses: release-drafter/release-drafter@v6.0.0
69+
uses: release-drafter/release-drafter@v6
7470
with:
7571
publish: ${{ steps.check-version.outputs.tag != '' }}
7672
tag: ${{ steps.check-version.outputs.tag }}

0 commit comments

Comments
 (0)