Merge pull request #7 from simplifi/gce-watcher #18
This file contains 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: build | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
test: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- | |
name: Run Tests | |
run: make test | |
- | |
name: Dry Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
args: release --snapshot --skip=publish --clean | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- | |
name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.SIFI_GITHUB_RUNNER_BOT_RELEASE_TOKEN }} |