Skip to content

Bump goreleaser/goreleaser-action from 4 to 5 #27

Bump goreleaser/goreleaser-action from 4 to 5

Bump goreleaser/goreleaser-action from 4 to 5 #27

Workflow file for this run

name: Continuous Integration
on:
pull_request:
push:
jobs:
build:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20.1'
- name: Check out
uses: actions/checkout@v3
- name: Get dependencies
run: |
go mod download
- name: Test Build
run: |
export LDFLAGS="-X main.version=TEST${GITHUB_REF_NAME}TEST -X main.revision=TEST${GITHUB_SHA}TEST -X main.built=`date -u +%Y-%m-%dT%H:%M:%SZ`"
go build -ldflags "$LDFLAGS" -o dist/watch-linux-amd64 .
dist/watch-linux-amd64 --version | grep " Version: TEST${GITHUB_REF_NAME}TEST"
dist/watch-linux-amd64 --version | grep " Revision: TEST${GITHUB_SHA}TEST"
- name: Tests
run: |
go test -v ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}