From 52fa0d05c51e72aab7b20faf8ab5ec24849ddbf8 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 18 Dec 2023 15:37:27 +0100 Subject: [PATCH] Reenable crates.io releases (fixes #4291) --- .woodpecker.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 6e30293de..6d6d34279 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -72,8 +72,8 @@ steps: commands: - wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz - tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz - - cp cargo-binstall /usr/local/cargo/bin - - cargo binstall -y cargo-machete + - cp cargo-binstall ./cargo-binstall + - ./cargo-binstall -y cargo-machete - cargo machete ignored_files: @@ -262,6 +262,21 @@ steps: when: event: cron + # using https://github.com/pksunkara/cargo-workspaces + publish_to_crates_io: + image: *rust_image + commands: + # reuse binstall from machete step + - cargo install cargo-workspaces + - ./cargo-binstall -y cargo-machete + - 'echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"' + - cp -r migrations crates/db_schema/ + - cargo login "$CARGO_API_TOKEN" + - cargo workspaces publish --from-git --allow-dirty --no-verify --allow-branch "${CI_COMMIT_TAG}" --yes custom "${CI_COMMIT_TAG}" + secrets: [cargo_api_token] + when: + event: tag + notify_on_failure: image: alpine:3 commands: