Skip to content

Commit

Permalink
ci: fix release to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
taobojlen committed Jul 6, 2024
1 parent c6f3b05 commit cf1c186
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ on:
- '*'

jobs:
build-and-publish:
build:
name: Build distribution
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -24,6 +22,26 @@ jobs:
--user
- name: Build
run: python3 -m build
- name: Publish
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish:
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/zealot
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit cf1c186

Please sign in to comment.