nightly.yml

 1name: Nightly Release
 2
 3on:
 4  push:
 5    branches:
 6      - master
 7    workflow_dispatch:
 8
 9permissions:
10  contents: write
11
12jobs:
13  nightly:
14    runs-on: macos-latest
15    steps:
16      - name: Checkout
17        uses: actions/checkout@v6
18        with:
19          fetch-depth: 0
20
21      - name: Set up Go
22        uses: actions/setup-go@v6
23        with:
24          go-version: "1.26.1"
25
26      - name: Set up Zig
27        uses: goto-bus-stop/setup-zig@v2
28
29      - name: Delete existing nightly release and tag
30        env:
31          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32        run: |
33          gh release delete nightly --yes --cleanup-tag || true
34
35      - name: Create nightly tag
36        run: |
37          git tag -f nightly
38          git push -f origin nightly
39
40      - name: Get macOS SDK path
41        id: macos_sdk
42        run: echo "path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT
43
44      - name: Run GoReleaser
45        uses: goreleaser/goreleaser-action@v7
46        with:
47          version: latest
48          args: release --clean --config .goreleaser.nightly.yml
49        env:
50          SDK_PATH: ${{ steps.macos_sdk.outputs.path }}
51          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}