Skip to content

Commit 8839ccd

Browse files
committed
feat: added publishing steps
1 parent 6e7e0db commit 8839ccd

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,30 @@ jobs:
3939
run: bundle exec rake release:rubygem_push
4040
- name: Wait for release
4141
run: gem exec rubygems-await pkg/*.gem
42+
crates:
43+
runs-on: ubuntu-latest
44+
45+
environment: packages
46+
47+
defaults:
48+
run:
49+
shell: bash
50+
working-directory: build/rust
51+
52+
steps:
53+
# Set up
54+
- uses: actions/checkout@v4
55+
- name: Setup rust
56+
run: rustup update --no-self-update stable
57+
- name: Install protoc
58+
run: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.0-rc1/protoc-28.0-rc-1-linux-x86_64.zip && unzip protoc-28.0-rc-1-linux-x86_64.zip -d ${{ runner.temp }}/proto && chmod +x ${{ runner.temp }}/proto/bin/protoc && ${{ runner.temp }}/proto/bin/protoc --version
59+
- name: Set version
60+
run: sed -i "s/version = \"0.0.0\"/version = \"${{ github.ref_name }}\"/" Cargo.toml
61+
- name: Cargo Login
62+
run: cargo login ${{secrets.CARGO_REGISTRY_TOKEN}}
63+
64+
# Release
65+
- name: Publish crate
66+
run: PATH=${{ runner.temp }}/proto/bin:$PATH cargo publish --allow-dirty
67+
env:
68+
RUST_BACKTRACE: 'full'

build/rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
version = "0.0.1"
2+
version = "0.0.0"
33
name = "tucana-internal"
44
edition = "2021"
55
description = "The rust crate for the internal gRPC communication of Code0"

0 commit comments

Comments
 (0)