-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
131 additions
and
1 deletion.
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,25 @@ | ||
name: release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v*.*.* | ||
jobs: | ||
release: | ||
name: Release awscccli | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.17" | ||
- name: Run goreleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
env: | ||
GO111MODULE: on | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
with: | ||
version: latest | ||
args: release --rm-dist |
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,33 @@ | ||
name: test | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
name: Test awscccli | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.17.0" | ||
- name: Test all | ||
env: | ||
GO111MODULE: on | ||
run: | | ||
make test-coverage | ||
- name: Install goveralls | ||
env: | ||
GO111MODULE: off | ||
run: go get github.com/mattn/goveralls | ||
- name: Send coverage | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: covprofile |
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,43 @@ | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- binary: acc | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm64 | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- none* | ||
changelog: | ||
skip: true | ||
brews: | ||
- name: awscccli | ||
tap: | ||
owner: chroju | ||
name: homebrew-tap | ||
token: | ||
url_template: "https://github.com/chroju/awscccli/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||
description: "Simple AWS CLI with Cloud Control API." | ||
homepage: "https://github.com/chroju/awscccli" | ||
license: "MIT" | ||
test: | | ||
system "#{bin}/acc --version" |
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 @@ | ||
BINARY_NAME=acc | ||
|
||
.PHONY: install test lint crossbuild clean | ||
|
||
install: | ||
go install | ||
|
||
lint: | ||
go mod tidy | ||
gofmt -s -l . | ||
golint ./... | ||
go vet ./... | ||
|
||
test: lint | ||
go test -v ./... | ||
|
||
crossbuild: test | ||
gox -os="linux darwin windows" -arch="386 amd64" -output "bin/remo_{{.OS}}_{{.Arch}}/{{.Dir}}" | ||
|
||
mod: | ||
go mod download | ||
|
||
clean: | ||
go clean | ||
rm -f $(BINARY_NAME) | ||
rm -f bin/ | ||
|
||
test-coverage: mod | ||
go test -race -covermode atomic -coverprofile=covprofile ./... |
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