Skip to content

Commit e830634

Browse files
committed
feat: use official python-semantic-release GitHub Action with proper yq installation (#99)
1 parent 68b316e commit e830634

2 files changed

Lines changed: 12 additions & 32 deletions

File tree

.github/workflows/semantic-release.yml

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,14 @@ jobs:
4242
fetch-depth: 0
4343
token: ${{ secrets.GITHUB_TOKEN }}
4444

45-
- name: Setup Python and UV
46-
uses: ./.github/actions/setup-python-uv
47-
with:
48-
python-version: '3.11'
49-
50-
- name: Install semantic-release
51-
run: |
52-
source .venv/bin/activate
53-
pip install python-semantic-release
45+
- name: Install yq
46+
uses: mikefarah/yq@v4.50.1
5447

55-
- name: Run semantic release
48+
- name: Python Semantic Release
49+
uses: python-semantic-release/python-semantic-release@v10.5.3
5650
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
RELEASE_MODE: ${{ inputs.mode || 'forward' }}
59-
RELEASE_COMMIT: ${{ inputs.commit }}
60-
RELEASE_VERSION: ${{ inputs.version }}
61-
run: |
62-
source .venv/bin/activate
63-
64-
if [ "${{ inputs.mode }}" = "historical" ]; then
65-
if [ -z "${{ inputs.commit }}" ] || [ -z "${{ inputs.version }}" ]; then
66-
echo "ERROR: Historical releases require both commit and version"
67-
exit 1
68-
fi
69-
echo "Creating historical release ${{ inputs.version }} from commit ${{ inputs.commit }}"
70-
RELEASE_MODE=historical RELEASE_COMMIT=${{ inputs.commit }} RELEASE_VERSION=${{ inputs.version }} semantic-release version
71-
elif [ "${{ inputs.mode }}" = "analysis" ]; then
72-
echo "Running release analysis"
73-
RELEASE_MODE=analysis ./dev-tools/release/analyze_rc_readiness.sh
74-
else
75-
echo "Running forward release with semantic-release"
76-
semantic-release version
77-
fi
51+
SKIP_PYPROJECT_GENERATION: "1"
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
git_committer_name: "github-actions[bot]"
55+
git_committer_email: "github-actions[bot]@users.noreply.github.com"

makefiles/deploy.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ ci-docs-deploy: ## Deploy documentation to GitHub Pages (matches docs.yml main
6262

6363
# @SECTION Build & Deploy
6464
build: clean dev-install ## Build package
65-
VERSION=$${VERSION:-$$(make -s get-version)} $(MAKE) generate-pyproject && \
65+
@if [ "$$SKIP_PYPROJECT_GENERATION" != "1" ]; then \
66+
VERSION=$${VERSION:-$$(make -s get-version)} $(MAKE) generate-pyproject; \
67+
fi && \
6668
VERSION=$${VERSION:-$$(make -s get-version)} BUILD_ARGS="$(BUILD_ARGS)" ./dev-tools/package/build.sh
6769

6870
build-test: build ## Build and test package installation

0 commit comments

Comments
 (0)