From 5c3877a4dee425c8d0f60faa6714f43e95b0e845 Mon Sep 17 00:00:00 2001 From: David Gidwani Date: Sun, 10 Mar 2024 17:18:06 -0400 Subject: [PATCH] ci: :ferris_wheel: more CI release fixes --- .github/workflows/publish.yml | 5 ++--- .github/workflows/release.yml | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8393e3c..8950a06 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,11 +9,12 @@ on: jobs: build: - name: Build source distribution and wheels + name: 🧱 Build source distribution and wheels uses: ./.github/workflows/wheels.yml if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == ${{ vars.RELEASE_PR_BRANCH || 'create-pull-request/patch' }} publish: + name: 📦 Publish to GitHub Releases and PyPI runs-on: ubuntu-latest if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == ${{ vars.RELEASE_PR_BRANCH || 'create-pull-request/patch' }} concurrency: publish @@ -29,14 +30,12 @@ jobs: uses: actions/download-artifact@v4 - name: Publish to GitHub Releases - if: github.event_name == 'workflow_dispatch' uses: python-semantic-release/upload-to-gh-release@main with: github_token: ${{ secrets.GITHUB_TOKEN }} tag: latest - name: Publish to PyPI - if: github.event_name == 'workflow_dispatch' uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95a8e4e..8351225 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,7 @@ permissions: jobs: build: name: Build source distribution and wheels + if: github.repository == 'darvid/python-hyperscan' && !contains(github.event.head_commit.message, 'python-semantic-release') uses: ./.github/workflows/wheels.yml release: @@ -16,7 +17,7 @@ jobs: runs-on: ubuntu-22.04 concurrency: release needs: build - if: github.repository == 'darvid/python-hyperscan' + if: github.repository == 'darvid/python-hyperscan' && !contains(github.event.head_commit.message, 'python-semantic-release') permissions: id-token: write pull-requests: write @@ -75,7 +76,7 @@ jobs: if: steps.release.outputs.released == 'true' run: | gh pr create -B main -H $RELEASE_PR_BRANCH \ - --title 'Merge $RELEASE_PR_BRANCH into main' \ + --title "$PR_TITLE" \ --body '🤖' env: PR_TITLE: "Release ${{ steps.release.outputs.version }}"