Skip to content

Commit 970f220

Browse files
authored
Merge branch 'main' into dependabot/go_modules/github.com/aws/aws-sdk-go-v2/service/s3-1.96.4
2 parents 1234a43 + 1125136 commit 970f220

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/pre-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,19 @@ jobs:
108108
cd dist
109109
sha256sum * > checksums.txt
110110
111-
- name: Delete existing snapshot release and tag
111+
- name: Clean up old snapshot releases
112112
run: |
113-
gh release delete snapshot --yes --cleanup-tag || true
113+
# Delete all previous snapshot-* releases (keep only latest)
114+
gh release list --limit 50 | grep '^snapshot-' | awk '{print $1}' | while read tag; do
115+
gh release delete "$tag" --yes --cleanup-tag || true
116+
done
114117
env:
115118
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116119

117120
- name: Create snapshot release
118121
run: |
119-
gh release create snapshot \
122+
TAG="snapshot-$(git rev-parse --short HEAD)"
123+
gh release create "$TAG" \
120124
--title "Snapshot (${{ steps.version.outputs.version }})" \
121125
--notes "Automated pre-release snapshot built from the latest commit on \`main\`.
122126
@@ -156,7 +160,7 @@ jobs:
156160

157161
- name: Build and push snapshot
158162
env:
159-
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
163+
KO_DOCKER_REPO: ghcr.io/gocodealone/workflow
160164
GOPRIVATE: github.com/GoCodeAlone/*
161165
GONOSUMCHECK: github.com/GoCodeAlone/*
162166
GOFLAGS: -mod=mod

0 commit comments

Comments
 (0)