Skip to content

Commit

Permalink
publish sdist from github
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Nov 19, 2023
1 parent ff64fa9 commit 2915d04
Showing 1 changed file with 25 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: "0 6 * * *" # Daily 6AM UTC build

jobs:
build:
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -45,22 +45,36 @@ jobs:
with:
path: ./wheelhouse/*.whl

publish:
build-sdist:
runs-on: ubuntu-latest

needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/dulwich-')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3

- name: Install twine
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Download wheels
pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz

publish:
runs-on: ubuntu-latest
needs:
- build-wheels
- build-sdist
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/dulwich-')
steps:
- name: Download distributions
uses: actions/download-artifact@v2
- name: Publish wheels
with:
name: artifact
path: dist
- name: Publish distributions
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload artifact/*.whl
run: twine upload dist/*

0 comments on commit 2915d04

Please sign in to comment.