Skip to content

Commit 5247312

Browse files
yuanhaoclaude
andcommitted
feat: add cargo publish to release workflow
Publishes to crates.io automatically when a v* tag is pushed. Requires CARGO_REGISTRY_TOKEN secret in the repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1ec5aa6 commit 5247312

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,23 @@ jobs:
9191
yoyo-${{ github.ref_name }}-${{ matrix.target }}.zip
9292
yoyo-${{ github.ref_name }}-${{ matrix.target }}.zip.sha256
9393
94+
publish:
95+
name: Publish to crates.io
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
100+
- name: Install Rust
101+
uses: dtolnay/rust-toolchain@stable
102+
103+
- name: Publish
104+
run: cargo publish
105+
env:
106+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
107+
94108
release:
95109
name: Create Release
96-
needs: build
110+
needs: [build, publish]
97111
runs-on: ubuntu-latest
98112
steps:
99113
- name: Download artifacts

0 commit comments

Comments
 (0)