Skip to content

Commit

Permalink
update pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Hk669 committed May 27, 2024
1 parent 907e625 commit 0e47dfb
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,15 @@ on:
types: [published]

jobs:
deploy:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: [3.10]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
# retrieve your distributions here

- name: Install from source
shell: pwsh
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel twine
python -m pip install -e .
- name: Build
shell: pwsh
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload --repository pypi dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 0e47dfb

Please sign in to comment.