From 3d3b4e0bea1fb7f5084545c423491dc732f16c3c Mon Sep 17 00:00:00 2001 From: Nite07 Date: Tue, 23 Apr 2024 17:28:05 +0800 Subject: [PATCH] :wrench: Update workflows --- .goreleaser.yaml | 1 - .woodpecker/docker-nightly.yml | 14 -------------- .woodpecker/docker.yml | 12 ++++++++++-- .woodpecker/release.yml | 6 ++++-- LICENSE.txt => LICENSE | 0 5 files changed, 14 insertions(+), 19 deletions(-) delete mode 100644 .woodpecker/docker-nightly.yml rename LICENSE.txt => LICENSE (100%) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0ba649e..580879e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,7 +8,6 @@ builds: - darwin goarch: - amd64 - - "386" ldflags: - -s -w -X sub2clash/constant.Version={{ .Version }} flags: diff --git a/.woodpecker/docker-nightly.yml b/.woodpecker/docker-nightly.yml deleted file mode 100644 index 676f025..0000000 --- a/.woodpecker/docker-nightly.yml +++ /dev/null @@ -1,14 +0,0 @@ -when: - - event: cron - cron: docker-nightly - -steps: - - name: build - image: woodpeckerci/plugin-docker-buildx - settings: - platforms: linux/amd64 - repo: nite07/sub2clash - tag: nightly - username: nite07 - password: - from_secret: docker_password diff --git a/.woodpecker/docker.yml b/.woodpecker/docker.yml index cf872a6..e9f6e97 100644 --- a/.woodpecker/docker.yml +++ b/.woodpecker/docker.yml @@ -1,13 +1,21 @@ when: - event: tag + - event: tag + ref: refs/tags/v* steps: + - name: prepare-tags + image: bash + commands: + - | + echo "${CI_COMMIT_TAG##v}" > .tags + if ! echo "${CI_COMMIT_TAG}" | grep -Eq "beta|alpha"; then + echo "latest" > .tags + fi - name: build image: woodpeckerci/plugin-docker-buildx settings: platforms: linux/amd64 repo: nite07/sub2clash - auto_tag: true username: nite07 password: from_secret: docker_password diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index 69a7109..23878ba 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -1,5 +1,6 @@ when: - event: tag + - event: tag + ref: refs/tags/v* steps: - name: build @@ -14,5 +15,6 @@ steps: settings: files: release/* api_key: - from_secret: gitea_key + from_secret: forgejo_token base-url: https://git.nite07.com + draft: true diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE