From 3782d3af2e6c4dbfc3ec7c20335a40625a9fcb05 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Mon, 5 Jun 2023 10:32:50 +0200 Subject: [PATCH] feat(ci): add release config --- .woodpecker/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .woodpecker/release.yml diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml new file mode 100644 index 0000000..5c4954c --- /dev/null +++ b/.woodpecker/release.yml @@ -0,0 +1,33 @@ +matrix: + PLATFORM: + - 'linux/amd64' + # - 'linux/arm64' + +platform: $PLATFORM +branches: [ main ] + +pipeline: + build: + image: 'rust:1.70-alpine3.18' + commands: + - apk add --no-cache build-base + - cargo build --release --verbose + # Ensure the release binary is also statically compiled + - '[ "$(readelf -d target/release/alex | grep NEEDED | wc -l)" = 0 ]' + - du -h target/release/alex + - mv target/release/alex target/release/alex-$(echo '${PLATFORM}' | sed 's:/:-:g')" + when: + event: tag + + publish: + image: 'plugins/gitea-release' + secrets: + - gitea_release_api_key + settings: + base_url: https://git.rustybever.be + files: target/release/alex-* + checksum: + - sha256 + title: ${CI_COMMIT_TAG} + when: + event: tag