Skip to content

Commit cdbab1f

Browse files
committed
update
1 parent 694064c commit cdbab1f

File tree

18 files changed

+659
-281
lines changed

18 files changed

+659
-281
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,30 @@ jobs:
1818
analyze:
1919
name: Analyze
2020
runs-on: ubuntu-latest
21+
permissions:
22+
actions: read
23+
contents: read
24+
security-events: write
2125

2226
strategy:
2327
fail-fast: false
2428
matrix:
25-
# Override automatic language detection by changing the below list
26-
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
2729
language: ['go']
28-
# Learn more...
29-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v2
34-
with:
35-
# We must fetch at least the immediate parents so that if this is
36-
# a pull request then we can checkout the head.
37-
fetch-depth: 2
38-
39-
# If this run was triggered by a pull request event, then checkout
40-
# the head of the pull request instead of the merge commit.
41-
- run: git checkout HEAD^2
42-
if: ${{ github.event_name == 'pull_request' }}
33+
uses: actions/checkout@v4
4334

4435
# Initializes the CodeQL tools for scanning.
4536
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
37+
uses: github/codeql-action/init@v3
4738
with:
4839
languages: ${{ matrix.language }}
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5340

54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
41+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5542
# If this step fails, then you should remove it and run the build manually (see below)
5643
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
44+
uses: github/codeql-action/autobuild@v3
5845

5946
# ℹ️ Command-line programs to run using the OS shell.
6047
# 📚 https://git.io/JvXDl
@@ -68,4 +55,4 @@ jobs:
6855
# make release
6956

7057
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
58+
uses: github/codeql-action/analyze@v3

.github/workflows/linter.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ jobs:
55
name: lint
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-go@v5
10+
with:
11+
go-version: stable
912
- name: golangci-lint
10-
uses: golangci/golangci-lint-action@v1
13+
uses: golangci/golangci-lint-action@v6
1114
with:
12-
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
13-
version: v1.29
14-
15-
# Optional: working directory, useful for monorepos
16-
# working-directory: somedir
17-
18-
# Optional: golangci-lint command line arguments.
19-
# args: --issues-exit-code=0
20-
21-
# Optional: show only new issues if it's a pull request. The default value is `false`.
22-
# only-new-issues: true
15+
version: latest

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313
steps:
1414
-
1515
name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919
-
2020
name: Set up Go
21-
uses: actions/setup-go@v2
21+
uses: actions/setup-go@v5
2222
with:
23-
go-version: 1.14
23+
go-version: stable
2424
-
2525
name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@v2
26+
uses: goreleaser/goreleaser-action@v6
2727
with:
2828
version: latest
29-
args: release --rm-dist
29+
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
go: ['1.11', '1.12', '1.13', '1.14']
10+
go: ['1.19', '1.20', '1.21', '1.22', '1.23']
1111

1212
steps:
13-
- uses: actions/setup-go@v1
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
1415
with:
1516
go-version: ${{ matrix.go }}
16-
- uses: actions/checkout@v2
1717
- run: go test -v -coverprofile=profile.cov ./...
1818

1919
- name: Send coverage

.goreleaser.yml

Lines changed: 85 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,107 @@
1-
# This is an example goreleaser.yaml file with some sane defaults.
2-
# Make sure to check the documentation at http://goreleaser.com
1+
version: 2
2+
33
before:
44
hooks:
5-
# You may remove this if you don't use go modules.
65
- go mod download
7-
# you may remove this if you don't need go generate
8-
- go generate ./...
6+
- go mod tidy
7+
98
builds:
10-
- env:
11-
- CGO_ENABLED=0
12-
goarch:
13-
- amd64
14-
- 386
15-
- arm
16-
- arm64
17-
18-
goarm:
9+
- env:
10+
- CGO_ENABLED=0
11+
goos:
12+
- linux
13+
- darwin
14+
- windows
15+
goarch:
16+
- amd64
17+
- arm64
18+
- arm
19+
- 386
20+
goarm:
1921
- 7
20-
ignore:
22+
ignore:
2123
- goos: darwin
2224
goarch: 386
25+
- goos: windows
26+
goarch: arm
27+
- goos: windows
28+
goarch: arm64
29+
ldflags:
30+
- -s -w -X main.version={{.Version}}
31+
32+
archives:
33+
- format: tar.gz
34+
name_template: >-
35+
{{ .ProjectName }}_
36+
{{- .Version }}_
37+
{{- title .Os }}_
38+
{{- if eq .Arch "amd64" }}x86_64
39+
{{- else if eq .Arch "386" }}i386
40+
{{- else }}{{ .Arch }}{{ end }}
41+
format_overrides:
42+
- goos: windows
43+
format: zip
44+
files:
45+
- LICENSE
46+
- README.md
47+
2348
checksum:
2449
name_template: 'checksums.txt'
50+
2551
snapshot:
26-
name_template: "{{ .Tag }}-next"
52+
name_template: "{{ incpatch .Version }}-next"
53+
2754
changelog:
28-
skip: true
29-
archives:
30-
- files:
31-
- none*
55+
sort: asc
56+
filters:
57+
exclude:
58+
- '^docs:'
59+
- '^test:'
60+
- '^chore:'
61+
- 'typo'
62+
3263
brews:
33-
- github:
64+
- repository:
3465
owner: codechenx
3566
name: homebrew-tv
3667
commit_author:
3768
name: codechenx
3869
39-
description: tv is a tool to view the delimited file in terminal.
70+
description: "Fast, feature-rich CSV/TSV/delimited file viewer for the command line"
4071
homepage: https://github.com/codechenx/tv
72+
license: MIT
73+
install: |
74+
bin.install "tv"
75+
test: |
76+
system "#{bin}/tv", "--version"
77+
4178
nfpms:
42-
- maintainer: codechenx
43-
description: tv is a tool to view the delimited file in terminal.
79+
- maintainer: codechenx <[email protected]>
80+
description: "Fast, feature-rich CSV/TSV/delimited file viewer for the command line"
4481
homepage: https://github.com/codechenx/tv
45-
license: Apache 2.0
82+
license: MIT
4683
formats:
47-
- deb
48-
- rpm
84+
- deb
85+
- rpm
86+
- apk
4987
bindir: /usr/bin
88+
89+
scoops:
90+
- repository:
91+
owner: codechenx
92+
name: scoop-bucket
93+
commit_author:
94+
name: codechenx
95+
96+
description: "Fast, feature-rich CSV/TSV/delimited file viewer for the command line"
97+
homepage: https://github.com/codechenx/tv
98+
license: MIT
99+
100+
snapcrafts:
101+
- name: codechenx-tv
102+
summary: Table viewer for terminal
103+
description: Fast, feature-rich CSV/TSV/delimited file viewer for the command line
104+
grade: stable
105+
confinement: strict
106+
publish: true
107+
license: MIT

0 commit comments

Comments
 (0)