Skip to content

Commit 786daa7

Browse files
authored
internal: publish cli to crates.io in ci (#577)
rel: #333 (comment)
1 parent 876baea commit 786daa7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/rust.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,24 @@ jobs:
176176
env:
177177
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
178178

179+
publish-crates-io:
180+
if: startsWith(github.ref, 'refs/tags/')
181+
needs: [build]
182+
runs-on: ubuntu-22.04
183+
steps:
184+
- name: Checkout
185+
uses: actions/checkout@v4
186+
- name: Install Toolchain
187+
uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
188+
with:
189+
toolchain: 1.88.0
190+
- name: Cache
191+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # pin@v2
192+
- name: Publish to crates.io
193+
run: cargo publish --package squawk
194+
env:
195+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
196+
179197
publish-docker:
180198
if: startsWith(github.ref, 'refs/tags/')
181199
needs: [build]

0 commit comments

Comments
 (0)