cloudflare/pint
Publicmirrored from https://github.com/cloudflare/pintAvailable
.github/workflows/compile.yml
41lines · modecode
| 1 | name: Compile |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | tags: |
| 8 | - '*' |
| 9 | pull_request: |
| 10 | branches: |
| 11 | - main |
| 12 | release: |
| 13 | types: |
| 14 | - published |
| 15 | |
| 16 | jobs: |
| 17 | build: |
| 18 | runs-on: ubuntu-latest |
| 19 | steps: |
| 20 | - name: Set up Go |
| 21 | uses: actions/setup-go@v2 |
| 22 | with: |
| 23 | go-version: 1.17.2 |
| 24 | |
| 25 | - name: Check out code |
| 26 | uses: actions/checkout@v2 |
| 27 | with: |
| 28 | fetch-depth: 0 |
| 29 | |
| 30 | - name: Compile binaries |
| 31 | uses: goreleaser/goreleaser-action@v2 |
| 32 | with: |
| 33 | args: build --snapshot --rm-dist |
| 34 | |
| 35 | - name: Release binaries |
| 36 | if: startsWith(github.ref, 'refs/tags/') |
| 37 | uses: goreleaser/goreleaser-action@v2 |
| 38 | with: |
| 39 | args: release --rm-dist |
| 40 | env: |
| 41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 42 | |