Skip to content

Commit

Permalink
ci: 🎡 more CI release fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Mar 10, 2024
1 parent 12d1b87 commit c6aae39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ 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:
name: Publish package
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
Expand Down Expand Up @@ -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 }}"
Expand Down

0 comments on commit c6aae39

Please sign in to comment.