Reenable crates.io releases (fixes #4291)

This commit is contained in:
Felix Ableitner 2023-12-18 15:37:27 +01:00
parent aab3ca4eb0
commit 52fa0d05c5

View file

@ -72,8 +72,8 @@ steps:
commands: commands:
- wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz - 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 - tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
- cp cargo-binstall /usr/local/cargo/bin - cp cargo-binstall ./cargo-binstall
- cargo binstall -y cargo-machete - ./cargo-binstall -y cargo-machete
- cargo machete - cargo machete
ignored_files: ignored_files:
@ -262,6 +262,21 @@ steps:
when: when:
event: cron 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: notify_on_failure:
image: alpine:3 image: alpine:3
commands: commands: