From 5fb77b726f49b7f67462180faf4f3b5a30f2b5ce Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 19 Dec 2023 15:16:20 +0100 Subject: [PATCH] move to top --- .woodpecker.yml | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 957d6e9c3..11214efed 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -107,6 +107,20 @@ steps: [MINIO_ENDPOINT, MINIO_WRITE_USER, MINIO_WRITE_PASSWORD, MINIO_BUCKET] when: *slow_check_paths + # using https://github.com/pksunkara/cargo-workspaces + publish_to_crates_io: + image: *rust_image + commands: + # reuse binstall from machete step + - ./cargo-binstall -y cargo-workspaces + - '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 + # make sure api builds with default features (used by other crates relying on lemmy api) check_api_common_default_features: image: *rust_image @@ -235,18 +249,18 @@ steps: - event: push branch: main - #publish_release_docker: - # image: woodpeckerci/plugin-docker-buildx - # secrets: [docker_username, docker_password] - # settings: - # repo: dessalines/lemmy - # dockerfile: docker/Dockerfile - # platforms: linux/amd64, linux/arm64 - # build_args: - # - RUST_RELEASE_MODE=release - # tag: ${CI_COMMIT_TAG} - # when: - # event: tag + publish_release_docker: + image: woodpeckerci/plugin-docker-buildx + secrets: [docker_username, docker_password] + settings: + repo: dessalines/lemmy + dockerfile: docker/Dockerfile + platforms: linux/amd64, linux/arm64 + build_args: + - RUST_RELEASE_MODE=release + tag: ${CI_COMMIT_TAG} + when: + event: tag nightly_build: image: woodpeckerci/plugin-docker-buildx @@ -261,20 +275,6 @@ 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-binstall -y cargo-workspaces - - '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: