-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from displague/workflows
Use GitHub Workflows for CI tests and goreleaser based releases
- Loading branch information
Showing
11 changed files
with
206 additions
and
116 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- master | ||
pull_request: | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.30 | ||
- | ||
name: Check GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: check | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.14' ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- run: go test -v ./... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
bin/docker-machine-driver-* | ||
checksums | ||
.idea/ | ||
|
||
.vscode/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
- GO111MODULE=on | ||
binary: docker-machine-driver-packet | ||
ldflags: | ||
- -X github.com/packethost/docker-machine-driver-packet/pkg/drivers/packet/packet.version={{.Version}} | ||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
goarm: | ||
- 6 | ||
- 7 | ||
ignore: | ||
- goos: windows | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm64 | ||
- goos: darwin | ||
goarch: arm64 | ||
- goos: darwin | ||
goarch: arm | ||
archives: | ||
- name_template: "{{ .Binary }}_{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
format: zip | ||
# replacements: | ||
# darwin: Darwin | ||
# linux: Linux | ||
# windows: Windows | ||
# 386: i386 | ||
# amd64: x86_64 | ||
checksum: | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" | ||
release: | ||
name_template: "{{.ProjectName}}-v{{.Version}}" | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
module github.com/packethost/docker-machine-driver-packet | ||
|
||
go 1.12 | ||
go 1.14 | ||
|
||
require ( | ||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect | ||
github.com/docker/docker v0.0.0-20180805161158-f57f260b49b6 // indirect | ||
github.com/docker/machine v0.16.2 | ||
github.com/google/go-cmp v0.3.0 // indirect | ||
github.com/onsi/ginkgo v1.8.0 // indirect | ||
github.com/onsi/gomega v1.5.0 // indirect | ||
github.com/packethost/packngo v0.2.0 | ||
github.com/pkg/errors v0.8.1 // indirect | ||
github.com/sirupsen/logrus v1.6.0 // indirect | ||
github.com/stretchr/testify v1.3.0 | ||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect | ||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 // indirect | ||
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect | ||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect | ||
gotest.tools v2.2.0+incompatible // indirect | ||
) |
Oops, something went wrong.