Skip to content

Commit

Permalink
make tag events upload to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
mrg29 committed Dec 14, 2023
1 parent 08dbd1f commit d8f4317
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,29 @@ jobs:
- name: Build packages
if: "matrix.python-version == '3.8'"
run: |
pip install -U twine wheel
python setup.py sdist bdist_wheel
pip install -U twine wheel build
pyproject-build .
twine check dist/*
- name: Upload packages
- name: Save packages as GitHub Actions artifacts
if: "matrix.python-version == '3.8'"
uses: actions/upload-artifact@v3
with:
name: flowlogs-reader-packages
path: dist/*
path: dist/

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs:
- build
permissions:
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: flowlogs-reader-packages
path: dist/
- name: Upload packages to PyPi
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit d8f4317

Please sign in to comment.