Skip to content

Commit 0a4c97e

Browse files
committed
feat: added cli publish
1 parent 709d894 commit 0a4c97e

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,21 @@ jobs:
6868
make_latest: true
6969
env:
7070
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
71+
72+
publish-cli:
73+
runs-on: ubuntu-latest
74+
if: startsWith(github.ref, 'refs/tags/cli-')
75+
defaults:
76+
run:
77+
working-directory: "./cli"
78+
steps:
79+
- name: Checkout Code
80+
uses: actions/checkout@v4
81+
- name: Set version
82+
run: |
83+
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^cli-//')
84+
sed -i "s/version = \"0.0.0\"/version = \"$VERSION\"/" Cargo.toml
85+
- name: Cargo Login
86+
run: cargo login ${{secrets.CRATES_IO_PUBLISH}}
87+
- name: Publish crate
88+
run: cargo publish --allow-dirty

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[package]
2-
name = "cli"
3-
version.workspace = true
4-
edition.workspace = true
2+
name = "code0-cli"
3+
version = "0.0.0"
4+
edition = "2024"
5+
description = "The cli for managing the Code0-Definitions"
6+
repository = "https://github.com/code0-tech/code0-definitions"
7+
homepage = "https://code0.tech"
8+
license = "Apache-2.0"
9+
readme = "../README.md"
510

611
[dependencies]
712
clap = { workspace = true, features = ["derive"] }

0 commit comments

Comments
 (0)