Skip to content

Commit

Permalink
.github: Merge release and PyPI steps.
Browse files Browse the repository at this point in the history
"on: release" only triggers for manual releases, not releases created by another workflow.

Fixes pybricks/support#1558
  • Loading branch information
laurensvalk committed Apr 5, 2024
1 parent c05d5c4 commit affc226
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/release-to-pypi.yml

This file was deleted.

12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on:
tags:
- 'v3.*'

name: Create release
name: Create release on GitHub and PyPI

permissions:
contents: write

jobs:
upload_release:
create_release:
name: Upload Release Assets
runs-on: ubuntu-22.04
steps:
Expand All @@ -28,3 +28,11 @@ jobs:
--title="${tag#v}" \
-F CHANGELOG.md \
$PRERELEASE_FLAG
build_and_publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: pipx run poetry build
- run: pipx run poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

0 comments on commit affc226

Please sign in to comment.