Skip to content

Commit

Permalink
ci - pdm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
commonism committed Aug 15, 2023
1 parent edda188 commit fb6a7dc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# https://pdm.fming.dev/latest/usage/publish/#publish-with-trusted-publishers

name: Publish

on:
workflow_dispatch: {}

env:
TAG: "the tag to publish"


jobs:
pypi-publish-test:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
with:
ref: $TAG
- uses: pdm-project/setup-pdm@v3

- name: Publish package distributions to test.PyPI
run: pdm publish --repository testpypi

pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
with:
ref: $TAG

- uses: pdm-project/setup-pdm@v3

- name: Publish package distributions to PyPI
run: pdm publish

0 comments on commit fb6a7dc

Please sign in to comment.