Skip to content

Commit 6da2e24

Browse files
pmarmaroliclaude
andcommitted
ci: consolidate release pipeline into single auto-release job
Remove publish.yml (triggered on tag push — tags pushed by GITHUB_TOKEN do not trigger other workflows, so it never ran after auto-release). auto-release.yml now owns the full pipeline in one job: bump patch version → build → publish to PyPI → commit bump + tag + push → create GitHub Release. Eliminates the double-publish 400 errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 48917e3 commit 6da2e24

2 files changed

Lines changed: 18 additions & 45 deletions

File tree

.github/workflows/auto-release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ jobs:
1010
release:
1111
if: "!startsWith(github.event.head_commit.message, 'chore: bump version')"
1212
runs-on: ubuntu-latest
13+
environment: pypi
1314
permissions:
14-
contents: write # push version-bump commit + tag back to master
15+
contents: write # push version-bump commit + tag, create GitHub Release
16+
id-token: write # OIDC trusted publishing to PyPI
1517

1618
steps:
1719
- uses: actions/checkout@v4
@@ -41,11 +43,25 @@ jobs:
4143
print(f"Bumped to {new_ver}")
4244
PYEOF
4345
44-
- name: Commit version bump and push tag
46+
- name: Install build tools
47+
run: pip install hatchling build
48+
49+
- name: Build
50+
run: python -m build
51+
52+
- name: Publish to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
55+
- name: Commit version bump, tag, and create GitHub Release
56+
env:
57+
GH_TOKEN: ${{ github.token }}
4558
run: |
4659
git config user.name "github-actions[bot]"
4760
git config user.email "github-actions[bot]@users.noreply.github.com"
4861
git add pyproject.toml
4962
git commit -m "chore: bump version to ${{ steps.version.outputs.version }}"
5063
git tag "v${{ steps.version.outputs.version }}"
5164
git push origin master --follow-tags
65+
gh release create "v${{ steps.version.outputs.version }}" dist/* \
66+
--title "vocametrix ${{ steps.version.outputs.version }}" \
67+
--generate-notes

.github/workflows/publish.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)