From 29164fc148e6e1057fb837cf8eb348725264e111 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 22 Jul 2023 00:28:02 +0200 Subject: [PATCH] ci: make mark releases for the beta channel as prereleases --- .woodpecker/publish.yaml | 42 +++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index 15a6d04a..f313687b 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -9,6 +9,20 @@ variables: - &enable_pnpm - corepack enable - corepack prepare pnpm@latest --activate + - &is_latest_channel + evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$" + - &is_beta_channel + evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+-[0-9]+$" + - &release_plugin woodpeckerci/plugin-gitea-release + - &release_base_settings + base_url: ${CI_FORGE_URL} + title: ${CI_COMMIT_TAG} + note: CHANGELOG.md + files: + - ${CI_REPO_NAME}.zip + - ${CI_REPO_NAME}/system.json + api_key: + from_secret: forge_token when: event: tag @@ -51,25 +65,27 @@ steps: commands: - echo latest > .RELEASE_CHANNEL when: - evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$" + <<: *is_latest_channel choose-beta-channel: group: prepare-release image: alpine:latest commands: - echo beta > .RELEASE_CHANNEL when: - evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+-[0-9]+$" - release: - image: woodpeckerci/plugin-gitea-release + <<: *is_beta_channel + release-latest: + image: *release_plugin settings: - base_url: ${CI_FORGE_URL} - title: ${CI_COMMIT_TAG} - note: CHANGELOG.md - files: - - ${CI_REPO_NAME}.zip - - ${CI_REPO_NAME}/system.json - api_key: - from_secret: forge_token + <<: *release_base_settings + when: + <<: *is_latest_channel + release-beta: + image: *release_plugin + settings: + <<: *release_base_settings + prerelease: true + when: + <<: *is_beta_channel publish-manifest: group: publish image: alpine:latest @@ -95,4 +111,4 @@ steps: - fvtt_username - fvtt_password when: - evaluate: CI_COMMIT_TAG matches "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$" + <<: *is_latest_channel