Skip to content

Commit

Permalink
ci: fix publish crates
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed Feb 25, 2024
1 parent 46d9a44 commit 8e96c79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish crates
name: "publish crates"
on:
push:
branches: ["**"]
Expand All @@ -9,6 +9,7 @@ permissions: {}

jobs:
set-up:
if: ${{ !( github.workflow == 'publish crates' && startsWith(github.event.head_commit.message, 'release:') && github.event.head_commit.author.name == 'github-actions[bot]' ) }}
runs-on: ubuntu-latest
permissions: {}
outputs:
Expand All @@ -19,9 +20,8 @@ jobs:
DRY_RUN: ${{ github.workflow == 'publish crates' }}
run: echo "dry-run=$DRY_RUN" >> $GITHUB_OUTPUT
publish:
if: ${{ !( github.workflow == 'crates publish' && startsWith(github.event.head_commit.message, 'release:') && github.event.head_commit.author.name == 'github-actions[bot]' ) }}
needs: ["set-up"]
name: "${{ needs.set-up.outputs.dry-run && 'DRY-RUN' || '' }} publish"
name: "${{ fromJson(needs.set-up.outputs.dry-run) && 'DRY-RUN' || '' }} publish"
runs-on: ubuntu-latest
permissions: {}
steps:
Expand All @@ -32,5 +32,5 @@ jobs:
- uses: katyo/publish-crates@33e1d18666cdfacf9f6c3547194d2c1d39cbf849 # v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
dry-run: ${{ true || needs.set-up.outputs.dry-run }}
dry-run: ${{ true || fromJson(needs.set-up.outputs.dry-run) }}
ignore-unpublished-changes: true

0 comments on commit 8e96c79

Please sign in to comment.