Skip to content

add .github/workflows/pypi-release.yml #2

add .github/workflows/pypi-release.yml

add .github/workflows/pypi-release.yml #2

Workflow file for this run

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
environment:
name: pypi
url: https://pypi.org/p/pyglossary
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- 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 }}
repository-url: https://pypi.org/legacy/