From 6a65b6057bacbe1ef66033a8b5f46d0747977e6c Mon Sep 17 00:00:00 2001 From: Jared Lewis Date: Thu, 11 Apr 2024 13:39:58 +1000 Subject: [PATCH] chore: Rebuild wheels when releasing --- .github/workflows/deploy.yaml | 10 +++++----- .github/workflows/release.yaml | 14 +++++++++----- .github/workflows/wheels.yaml | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 98174a4..629a024 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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 @@ -40,10 +40,10 @@ jobs: with: python-version: "3.x" - - uses: actions/download-artifact@v4 + - uses: robinraju/release-downloader@v1.10 with: - pattern: cibw-* - merge-multiple: true - path: dist + latest: true + fileName: "*" + out-file-path: dist/ - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4b29b8e..115c177 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index edcb3d0..44a428e 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -11,6 +11,7 @@ on: tags: - v* workflow_dispatch: + workflow_call: jobs: build_sdist: