Skip to content

Commit

Permalink
fix: run publish-vortex.yml when release-plz releases (#855)
Browse files Browse the repository at this point in the history
When release plz pushses a tag it uses the GITHUB_TOKEN secret which
[explicitly does not trigger any
workflows](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#triggering-a-workflow-from-a-workflow).
Instead, we can call the publish-vortex workflow explicitly from the
release-plz workflow whenever release-plz actually releases a crate.
  • Loading branch information
danking authored Sep 17, 2024
1 parent 64bb151 commit a6315f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/publish-vortex.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish to PyPI
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_call:

jobs:
macos:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:
- uses: ./.github/actions/setup-python

- name: Run release-plz
id: run-release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Release to PyPI
if: ${{ steps.run-release-plz.outputs.releases_created }}
uses: ./.github/workflows/publish-vortex.yml

0 comments on commit a6315f7

Please sign in to comment.