Skip to content

Commit

Permalink
Set up publishing to PyPI (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
akx authored Feb 8, 2024
1 parent 9c26527 commit fa6870e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
tags:
- "v*"
pull_request:

jobs:
Expand Down Expand Up @@ -36,7 +38,28 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: pip install build && python -m build
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: wheel
path: dist/*.whl
Publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- Build
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/django-urr/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true

0 comments on commit fa6870e

Please sign in to comment.