Skip to content

Commit

Permalink
Add crate-publish workflow step
Browse files Browse the repository at this point in the history
  • Loading branch information
JamyGolden committed Jun 23, 2024
1 parent 9c2a1d5 commit 2189f06
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish-crate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish crate to crates.io
on:
workflow_call:
secrets:
CRATES_IO_TOKEN:
description: crates.io token
required: true
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: cargo publish -p tinted-builder-rust --locked
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,9 @@ jobs:
git_tag_name: v${{ needs.setup-environment.outputs.git_tag_name }}
secrets:
DOCKER_GHCR: ${{ secrets.DOCKER_GHCR }}

publish-crate:
needs: release
uses: ./.github/workflows/publish-crate.yml
secrets:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}

0 comments on commit 2189f06

Please sign in to comment.