-
Notifications
You must be signed in to change notification settings - Fork 1k
59 lines (50 loc) · 1.62 KB
/
Copy pathnightly-release.yaml
File metadata and controls
59 lines (50 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Nightly Release
on:
schedule:
# Run every Sunday at 00:00 UTC
- cron: "0 0 * * 0"
workflow_dispatch:
# Allow manual trigger
permissions:
contents: write
jobs:
nightly-release:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26"
cache: true
- name: Delete existing nightly release assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="v0.0.0-nightly"
gh release view "$TAG" --json assets -q '.assets[].name' | while read -r asset; do
echo "Deleting asset: $asset"
gh release delete-asset "$TAG" "$asset" --yes
done
- name: Create release notes
run: |
cat << 'EOF' > /tmp/release-notes.md
## Nightly Build
> **Note**: This is a nightly build, not a tagged release. Even though you enjoy the latest features, things may change when the official release.
Built from commit: ${{ github.sha }}
EOF
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --skip=validate --parallelism=1 --release-notes=/tmp/release-notes.md --config test/goreleaser-nightly.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: v0.0.0-nightly
GOGC: "50"
GOMEMLIMIT: "5GiB"