ci: update tag to nightlyv0 #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| nightly: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26.1" | |
| - name: Set up Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| - name: Get macOS SDK path | |
| id: macos_sdk | |
| run: echo "path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT | |
| - name: Build with GoReleaser (snapshot) | |
| uses: goreleaser/goreleaser-action@v7 | |
| with: | |
| version: latest | |
| args: release --snapshot --clean --config .goreleaser.nightly.yml | |
| env: | |
| SDK_PATH: ${{ steps.macos_sdk.outputs.path }} | |
| - name: Delete existing nightly release | |
| env: | |
| GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
| run: | | |
| gh release delete nightlyv0 --yes --cleanup-tag || true | |
| - name: Create nightly release | |
| env: | |
| GH_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
| run: | | |
| gh release create nightlyv0 dist/*.tar.gz dist/*.zip dist/checksums.txt \ | |
| --title "Nightly Build ($(git rev-parse --short HEAD))" \ | |
| --notes "This is an automated nightly build from the latest \`master\` commit ($(git rev-parse --short HEAD)).\nIt may be unstable — use stable releases for production." \ | |
| --prerelease \ | |
| --target master |