first commit #1
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 windows build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: build and release | |
| runs-on: windows-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: set up go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| - name: build for windows amd64 | |
| run: | | |
| $env:GOOS = "windows" | |
| $env:GOARCH = "amd64" | |
| go build -o setup-launcher.exe main.go | |
| - name: delete existing nightly release (if exists) | |
| run: | | |
| gh release delete nightly --yes || echo "no nightly release to delete" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: create nightly release | |
| run: | | |
| gh release create nightly setup-launcher.exe ` | |
| --title "nightly build" ` | |
| --notes "automated nightly release of the latest windows build." ` | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |