From caa43beea35c36db513192437e0f5598aa2d25bc Mon Sep 17 00:00:00 2001 From: Ivan Leo Date: Mon, 8 Jul 2024 17:12:12 +0800 Subject: [PATCH 1/3] try again --- .github/workflows/release.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95124eb..20eaa3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Deploy on: push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" + branches: + - add-release-ci jobs: build-and-upload: @@ -12,16 +12,11 @@ jobs: strategy: matrix: - # You can add more, for any target you'd like! include: - build: linux os: ubuntu-latest target: x86_64-unknown-linux-musl - - build: macos - os: macos-latest - target: x86_64-apple-darwin - steps: - name: Checkout uses: actions/checkout@v3 @@ -40,6 +35,6 @@ jobs: - name: Install Rust run: rustup target add ${{ matrix.target }} - - name: Publish to Cargo - run: | - cargo workspaces publish --verbose --allow-branch * --token ${{ secrets.CARGO_REGISTRY_TOKEN }} + - uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} From 9705deccffe050d35345d4e755c0eee7da5f605b Mon Sep 17 00:00:00 2001 From: Ivan Leo Date: Mon, 8 Jul 2024 17:28:11 +0800 Subject: [PATCH 2/3] Experimenting with a simple CI target --- .github/workflows/release.yml | 5 ++++- Cargo.toml | 2 ++ instruct-macros/Cargo.toml | 2 +- instructor/Cargo.toml | 5 ++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20eaa3c..599e11c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Deploy on: push: branches: - - add-release-ci + - 'v[0-9]+\.[0-9]+\.[0-9]+' jobs: build-and-upload: @@ -35,6 +35,9 @@ jobs: - 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 }} diff --git a/Cargo.toml b/Cargo.toml index dfb4848..c069071 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,2 +1,4 @@ [workspace] members = ["instruct-macros-types", "instruct-macros", "instructor"] + +resolver = "2" diff --git a/instruct-macros/Cargo.toml b/instruct-macros/Cargo.toml index aa4995c..4722b7b 100644 --- a/instruct-macros/Cargo.toml +++ b/instruct-macros/Cargo.toml @@ -17,7 +17,7 @@ license = "MIT OR Apache-2.0" [dependencies] serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -instruct-macros-types = { path = "../instruct-macros-types", version = "0.1.0" } +instruct-macros-types = { path = "../instruct-macros-types", version = "0.*" } proc-macro2 = "1.0.86" [dependencies.syn] diff --git a/instructor/Cargo.toml b/instructor/Cargo.toml index 0b1988c..8dc55c0 100644 --- a/instructor/Cargo.toml +++ b/instructor/Cargo.toml @@ -1,6 +1,5 @@ [package] name = "instructor-ai" -version = "0.1.7" edition = "2021" authors = ["Ivan Leo "] description = "instructor-ai is a simple crate that allows for users to do validated structured outputs" @@ -13,11 +12,11 @@ license = "MIT OR Apache-2.0" changelog = "CHANGELOG.md" [dependencies] -instruct-macros = { path = "../instruct-macros" } +instruct-macros = { path = "../instruct-macros", version = "0.*" } +instruct-macros-types = { path = "../instruct-macros-types", version = "0.*" } openai-api-rs = "4.1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -instruct-macros-types = { path = "../instruct-macros-types" } [lib] name = "instructor_ai" From dcca839d0e135bd413b9a724868cbf6351e625e7 Mon Sep 17 00:00:00 2001 From: Ivan Leo Date: Mon, 8 Jul 2024 17:32:54 +0800 Subject: [PATCH 3/3] Change the tag --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 599e11c..8956130 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Deploy on: - push: - branches: + create: + tags: - 'v[0-9]+\.[0-9]+\.[0-9]+' jobs: