Skip to content

Commit

Permalink
Experimenting with using workspaces to manage version
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanleomk committed Jul 8, 2024
1 parent dcca839 commit 031c6f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
create:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
push:
branches:
- "test-ci"

jobs:
build-and-upload:
Expand All @@ -21,23 +24,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true

- name: Install Rust
run: rustup target add ${{ matrix.target }}

- name: Bump version to the tag
run: cargo workspaces version $VERSION --all --no-git-push --no-git-tag --yes

- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
members = ["instruct-macros-types", "instruct-macros", "instructor"]

resolver = "2"

[workspace.package]
version = "0.1.8"
1 change: 0 additions & 1 deletion instruct-macros-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
name = "instruct-macros-types"
version = "0.1.7"
edition = "2021"
authors = ["Ivan Leo <[email protected]>"]
description = "Instructor Macro Types are a collection of simple types that we export to work with the instruct-macros crate"
Expand Down
1 change: 0 additions & 1 deletion instruct-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
name = "instruct-macros"
version = "0.1.7"
edition = "2018"
authors = ["Ivan Leo <[email protected]>"]
description = "instruct-macros are a collection of simple macros that we're using in Instructor-AI to generate json schema from Serde Objects"
Expand Down

0 comments on commit 031c6f2

Please sign in to comment.