Skip to content

Commit

Permalink
Move out cargo publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Mar 27, 2024
1 parent 4940667 commit c798576
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Crates

on:
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'
pull_request:

jobs:
publish-crates:
name: Publish to crates.io
runs-on: ubuntu-latest
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
if: ${{ !github.event.pull_request }}
steps:
- uses: actions/checkout@v4
- uses: swatinem/rust-cache@v2
- name: Publish
run: |
./scripts/publish-all.sh
14 changes: 0 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,3 @@ jobs:
body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }}
prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }}
artifacts: "artifacts/*"

# Publish to crates.io
publish-crates:
name: Publish to crates.io
runs-on: ubuntu-latest
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
if: ${{ !github.event.pull_request }}
steps:
- uses: actions/checkout@v4
- uses: swatinem/rust-cache@v2
- name: Publish
run: |
./scripts/publish-all.sh

0 comments on commit c798576

Please sign in to comment.