Skip to content

Commit 93a0e6f

Browse files
committed
Update workflows and dependencies
1 parent b2bf5a2 commit 93a0e6f

File tree

7 files changed

+368
-63
lines changed

7 files changed

+368
-63
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ updates:
1111
- "dependencies"
1212
schedule:
1313
# how often to look for updates
14-
interval: "weekly"
14+
interval: "monthly"
1515
# what day to use for opening new requests
1616
day: "monday"
1717
# check for npm updates at 0hrs UTC
@@ -27,4 +27,4 @@ updates:
2727
- package-ecosystem: "github-actions"
2828
directory: "/"
2929
schedule:
30-
interval: "daily"
30+
interval: "monthly"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
timeout-minutes: 10
1717
steps:
1818
# Go 1.14
19-
- name: Set up Go 1.14
19+
- name: Set up Go 1.15
2020
uses: actions/setup-go@v2
2121
with:
22-
go-version: ^1.14
22+
go-version: ^1.15
2323

2424
# Checkout code
2525
- name: Checkout repository
@@ -49,7 +49,7 @@ jobs:
4949
- name: Static analysis
5050
uses: golangci/golangci-lint-action@v2
5151
with:
52-
version: v1.29
52+
version: v1.32
5353

5454
# Run unit tests
5555
- name: Test

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
if: startsWith(github.ref, 'refs/tags/')
1313
steps:
1414
# Go 1.14
15-
- name: Set up Go 1.14
15+
- name: Set up Go 1.15
1616
uses: actions/setup-go@v2
1717
with:
18-
go-version: ^1.14
18+
go-version: ^1.15
1919

2020
# Checkout code
2121
- name: Checkout repository
@@ -54,4 +54,7 @@ jobs:
5454
version: latest
5555
args: release --rm-dist --skip-validate
5656
env:
57+
# https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow
5758
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
59+
# Login of the user that initiated the workflow run
60+
GITHUB_USER: ${{ github.actor }}

.goreleaser.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# main project identifier
2+
project_name: tredctl
13
# produced artifacts are stored in this folder
24
dist: dist
35
# customize execution
@@ -38,29 +40,28 @@ builds:
3840
# https://goreleaser.com/customization/archive/
3941
archives:
4042
# a single project can produce multiple archives
41-
-
42-
name_template: "tredctl_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
43+
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
4344
# generate integrity checksums
4445
# https://goreleaser.com/customization/checksum/
4546
checksum:
46-
name_template: 'tredctl_{{ .Version }}_checksums.txt'
47+
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
4748
algorithm: sha256
4849
# Include source code package on the release
4950
# https://goreleaser.com/customization/source/
5051
source:
51-
enabled: false
52+
enabled: true
5253
# produce test releases
5354
# https://goreleaser.com/customization/snapshots/
5455
snapshot:
55-
name_template: '{{ .Tag }}-next'
56+
name_template: "{{ .Version }}-next"
5657
# configure the 'CHANGELOG.md' file produced
5758
# https://goreleaser.com/customization/release/#customize-the-changelog
5859
changelog:
5960
sort: asc
6061
filters:
6162
exclude:
62-
- '^docs:'
63-
- '^test:'
63+
- "^docs:"
64+
- "^test:"
6465
- typo
6566
# Produce homebrew formulas for the project artifacts
6667
# https://goreleaser.com/customization/homebrew/

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ release:
5555
## scan: Look for known vulnerabilities in the project dependencies
5656
# https://github.com/sonatype-nexus-community/nancy
5757
scan:
58-
@nancy -quiet go.sum
58+
@go list -f '{{if not .Indirect}}{{.}}{{end}}' -mod=mod -m all | nancy sleuth -o text
5959

6060
## test: Run unit tests excluding the vendor dependencies
6161
test:
6262
go test -v -race -failfast -coverprofile=coverage.report ./...
6363
go tool cover -html coverage.report -o coverage.html
6464

6565
## updates: List available updates for direct dependencies
66+
# https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies
6667
updates:
67-
# https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies
68-
go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all 2> /dev/null
68+
@go list -mod=mod -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all 2> /dev/null

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module github.com/bryk-io/tred-cli
33
go 1.13
44

55
require (
6-
github.com/cheggaaa/pb/v3 v3.0.4
6+
github.com/cheggaaa/pb/v3 v3.0.5
77
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
88
github.com/pkg/errors v0.9.1
9-
github.com/sirupsen/logrus v1.6.0
10-
github.com/spf13/cobra v1.0.0
9+
github.com/sirupsen/logrus v1.7.0
10+
github.com/spf13/cobra v1.1.1
1111
github.com/spf13/viper v1.7.1
1212
github.com/x-cray/logrus-prefixed-formatter v0.5.2
13-
go.bryk.io/x v0.0.0-20200804135449-2d3679bd6c48
14-
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
13+
go.bryk.io/x v0.0.0-20201109215750-b97ba1a6d63a
14+
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
1515
)

0 commit comments

Comments
 (0)