Release Python Package on PyPI #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Python Package on PyPI | ||
on: | ||
release: | ||
types: [published] | ||
permissions: | ||
contents: read | ||
jobs: | ||
build-test: | ||
uses: ./.github/workflows/python-package.yaml | ||
Check failure on line 12 in .github/workflows/release.yml
|
||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
needs: build-test | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/zonefilegen | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install build dependencies | ||
run: python -m pip install --upgrade setuptools wheel build | ||
- name: Build package | ||
run: python -m build . | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |