From 40e70ad8339ecba9aca9ba27883205d8813b1d68 Mon Sep 17 00:00:00 2001 From: alcxyz Date: Sun, 3 May 2026 18:43:15 +0200 Subject: [PATCH] ci: prevent duplicate release publication --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 43 ----------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d664665..04b479a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: id: tag run: | VERSION="v$(cat VERSION)" - if git rev-parse "$VERSION" >/dev/null 2>&1; then + if git tag -l "$VERSION" | grep -q . || git ls-remote --tags origin "$VERSION" | grep -q .; then echo "Tag $VERSION already exists, skipping." echo "created=false" >> "$GITHUB_OUTPUT" else diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 924877e..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Release - -on: - push: - tags: - - "v*.*.*" - -permissions: - contents: write - -jobs: - goreleaser: - name: GoReleaser - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true - - - name: Write AUR SSH key - run: | - mkdir -p ~/.ssh - echo "$AUR_KEY_CONTENT" > ~/.ssh/aur_key - chmod 600 ~/.ssh/aur_key - ssh-keyscan -t rsa aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null || true - echo "AUR_KEY_PATH=$HOME/.ssh/aur_key" >> "$GITHUB_ENV" - env: - AUR_KEY_CONTENT: ${{ secrets.AUR_SSH_KEY }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - version: "~> v2" - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} - AUR_KEY: ${{ env.AUR_KEY_PATH }}