Skip to content

Commit

Permalink
ci: using action for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
pthierry-ledger committed Jul 12, 2024
1 parent 025f9c6 commit 2ce09bc
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,20 @@ on:
types: [released]

jobs:
deploy:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release

environment:
name: release
url: https://pypi.org/p/svd2json
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install twine
run: |
pip install twine build
- name: Mint token
id: mint
uses: tschm/[email protected]

- name: Build n check python package
run: |
python -m build
twine check dist/*.whl
- name: Publish package to registry
run: |
twine upload --disable-progress-bar -u __token__ -p '${{ steps.mint.outputs.api-token }}' dist
# retrieve your distributions here

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verify-metadata: true
skip-existing: true
print-hash: true

0 comments on commit 2ce09bc

Please sign in to comment.