Skip to content

Commit

Permalink
Use pypa/gh-action-pypi-publish for pypi publishing in CI and run p…
Browse files Browse the repository at this point in the history
…ublish workflow after build
  • Loading branch information
SRv6d committed Sep 13, 2024
1 parent b0a1f3d commit 7fd16ce
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name: Publish

on:
release:
types: [published]
workflow_run:
workflows: [Build]
types: [completed]
workflow_dispatch:

permissions:
Expand All @@ -15,6 +16,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
- name: Publish to PyPI
run: pdm publish
- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Create Dist Directory
run: mkdir dist

- name: Download Relase Sdist and Wheel
run: gh release download ${GITHUB_REF_NAME} --pattern "anycastd-*" --dir dist
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 7fd16ce

Please sign in to comment.