Skip to content

Commit

Permalink
chore: Rebuild wheels when releasing
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjared committed Apr 11, 2024
1 parent 9229670 commit 6a65b60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
upload-all:
name: Upload if release
needs: [ build_wheels, build_sdist, pre-deploy-checks ]
needs: [ pre-deploy-checks ]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: pypi
Expand All @@ -40,10 +40,10 @@ jobs:
with:
python-version: "3.x"

- uses: actions/download-artifact@v4
- uses: robinraju/[email protected]
with:
pattern: cibw-*
merge-multiple: true
path: dist
latest: true
fileName: "*"
out-file-path: dist/

- uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,22 @@ jobs:
- name: Run tests
run: |
poetry run pytest -r a -v src tests --doctest-modules
- name: Build package
run: |
poetry build --no-interaction
- name: Generate wheels
uses: ./.github/workflows/wheels.yml
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
merge-multiple: true
path: dist
- name: Generate Release Notes
run: |
git log $(git describe --tags --abbrev=0 HEAD^)..HEAD --pretty='format:* %h %s' --no-merges >> ".github/release_template.md"
- name: Create Release Draft
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: ".github/release_template.md"
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
draft: true
files: |
dist/fgen_example-${{ env.PROJECT_VERSION }}-py3-none-any.whl
dist/fgen_example-${{ env.PROJECT_VERSION }}-*.whl
dist/fgen_example-${{ env.PROJECT_VERSION }}.tar.gz
1 change: 1 addition & 0 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
tags:
- v*
workflow_dispatch:
workflow_call:

jobs:
build_sdist:
Expand Down

0 comments on commit 6a65b60

Please sign in to comment.