You've already forked go-semantic-release
build(ci): update github action
This commit is contained in:
@@ -1,7 +1,26 @@
|
|||||||
name: Go
|
name: Go
|
||||||
on: [push, pull_request]
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go 1.12
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.12
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: |
|
||||||
|
export PATH=$PATH:$(go env GOPATH)/bin
|
||||||
|
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
|
||||||
|
golangci-lint run ./...
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -16,20 +35,15 @@ jobs:
|
|||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: |
|
|
||||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
|
|
||||||
golangci-lint run ./...
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: go test -v ./...
|
run: go test -v ./...
|
||||||
|
|
||||||
- name: Build binary without version
|
- name: Build binary without version
|
||||||
run: go build -o build/go-semantic-release-temp ./cmd/go-semantic-release/
|
run:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build on ${{ matrix.os }}
|
name: Build on ${{ matrix.os }}
|
||||||
needs: Test
|
needs: [Test, Lint]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -37,4 +51,5 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: |
|
run: |
|
||||||
|
go build -o build/go-semantic-release-temp ./cmd/go-semantic-release/
|
||||||
go build -o build/go-semantic-release -ldflags "-w -s --X main.version=`./build/go-semantic-release-temp next`" ./cmd/go-semantic-release/
|
go build -o build/go-semantic-release -ldflags "-w -s --X main.version=`./build/go-semantic-release-temp next`" ./cmd/go-semantic-release/
|
||||||
Reference in New Issue
Block a user