Skip to content

Commit

Permalink
add .github/workflows/pypi-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jun 17, 2024
1 parent b41161d commit c6f3581
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: pypi-publish

on:
push:
branches: ["pypi-release-action"]
pull_request:
schedule:
- cron: "33 1 * * 3"

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/pyglossary
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create release
run: |
sudo rm -rf dist/* build/* || true
python3 setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit c6f3581

Please sign in to comment.