Skip to content

Commit fb99bb3

Browse files
authored
fix(ci): goreleaser config works (#25)
Signed-off-by: Calum Murray <cmurray@redhat.com>
1 parent 5c73995 commit fb99bb3

2 files changed

Lines changed: 16 additions & 20 deletions

File tree

.github/workflows/nightly.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,13 @@ jobs:
7272
with:
7373
fetch-depth: 0
7474

75-
- name: Delete existing nightly release and tag
75+
- name: Prepare nightly release
7676
run: |
77-
# Delete existing nightly release if it exists
78-
if gh release view nightly >/dev/null 2>&1; then
79-
echo "Deleting existing nightly release"
80-
gh release delete nightly --yes
81-
fi
82-
83-
# Delete existing nightly tag if it exists
84-
if git rev-parse --verify nightly >/dev/null 2>&1; then
85-
echo "Deleting existing nightly tag"
86-
git tag -d nightly
87-
git push origin :refs/tags/nightly 2>/dev/null || true
88-
fi
77+
gh release delete nightly --yes --cleanup-tag || true
78+
gh release create nightly \
79+
--title "Nightly ($(date -u +%Y-%m-%d) - $(git rev-parse --short HEAD))" \
80+
--generate-notes \
81+
--prerelease
8982
env:
9083
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9184

@@ -101,6 +94,11 @@ jobs:
10194
uses: goreleaser/goreleaser-action@v6
10295
with:
10396
version: '~> v2'
104-
args: release --nightly --clean
97+
args: release --snapshot --clean --skip=publish
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
101+
- name: Upload artifacts
102+
run: gh release upload nightly dist/*.zip dist/*.bundle dist/checksums.txt --clobber
105103
env:
106104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
version: 2
22

3+
git:
4+
ignore_tags:
5+
- nightly
6+
37
builds:
48
- main: ./cmd
59
binary: "kubernetes-extension-{{ .Os }}-{{ .Arch }}"
@@ -35,11 +39,5 @@ signs:
3539
release:
3640
prerelease: auto
3741

38-
nightly:
39-
tag_name: nightly
40-
name_template: "Nightly Release ({{ .Date }} - {{ .ShortCommit }})"
41-
keep_single_release: true
42-
publish_release: true
43-
4442
changelog:
4543
sort: asc

0 commit comments

Comments
 (0)