this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(ci): trigger publish workflow explicitly from release-plz

GITHUB_TOKEN events don't trigger downstream workflows, so the
release-plz workflow now dispatches publish.yml directly after
creating a release.

+18 -8
+8 -8
.github/workflows/publish.yml
··· 4 4 # 1. workflow_run: After Nix CI passes on main. Builds the snap to validate 5 5 # the packaging pipeline on every push to main. 6 6 # 7 - # 2. release (published): After release-plz creates a GitHub release and tag. 8 - # Builds the snap with the release version and publishes to the Snap Store. 9 - # 10 - # 3. workflow_dispatch: Manual retry for a failed release. Accepts a tag name 7 + # 2. workflow_dispatch: Triggered by the release-plz workflow after a release 8 + # is created, or manually for retrying a failed release. Accepts a tag name 11 9 # input and publishes the snap for that tag. 12 10 # 13 - # On release day, both triggers 1 and 2 fire independently — the workflow_run 14 - # from the merge to main, and the release event from release-plz tagging. This 15 - # is intentional: the dev run validates the pipeline, and the release run 16 - # publishes the versioned snap. 11 + # 3. release (published): Kept as a fallback trigger in case the release is 12 + # created with a token that fires events (e.g. a PAT or GitHub App token). 13 + # 14 + # Note: release-plz uses GITHUB_TOKEN, so releases it creates do not fire the 15 + # release event (GitHub Actions limitation). The release-plz workflow explicitly 16 + # dispatches this workflow instead. 17 17 18 18 name: Publish 19 19
+10
.github/workflows/release-plz.yml
··· 32 32 id: cratesio-auth 33 33 34 34 - name: Run release-plz 35 + id: release-plz 35 36 uses: release-plz/action@f708778669256143d984cce4b23592637532e040 # v0.5.127 36 37 with: 37 38 command: release ··· 39 40 env: 40 41 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 42 CARGO_REGISTRY_TOKEN: ${{ steps.cratesio-auth.outputs.token }} 43 + 44 + - name: Trigger publish workflow 45 + if: steps.release-plz.outputs.releases_created == 'true' 46 + env: 47 + RELEASES: ${{ steps.release-plz.outputs.releases }} 48 + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 49 + run: | 50 + TAG=$(echo "$RELEASES" | jq -r '.[0].tag_name') 51 + gh workflow run publish.yml -f tag_name="$TAG" 42 52 43 53 release-plz-pr: 44 54 name: Release-plz PR