fix: build scope #13
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 launcher.exe | |
| - name: pack binary | |
| uses: crazy-max/ghaction-upx@v3.2.0 | |
| with: | |
| version: latest | |
| files: | | |
| launcher.exe | |
| args: --best --lzma | |
| - name: delete existing nightly release (if exists) | |
| run: | | |
| gh release delete nightly --yes || true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: create nightly release | |
| run: | | |
| gh release create nightly launcher.exe ` | |
| --title "nightly build" ` | |
| --notes "automated nightly release of the latest windows build." ` | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |