Skip to content

Commit 3164bee

Browse files
authored
feat: bump deps and actions (air-verse#536)
1 parent ca162a8 commit 3164bee

11 files changed

+242
-469
lines changed

.github/workflows/build.yml

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: Build
22

33
on:
44
push:
@@ -10,49 +10,50 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, macos-latest]
13-
name: build
13+
name: Build
1414
runs-on: ${{ matrix.os }}
1515
steps:
16-
- name: check out code
16+
- name: Check out code
1717
uses: actions/checkout@v4
18-
- name: setup Go 1.22
18+
- name: Setup Go
1919
id: go
2020
uses: actions/setup-go@v4
2121
with:
2222
go-version: ^1.22
23-
- name: build
23+
24+
- name: Build
2425
run: make build
25-
- name: install dependency
26+
- name: Install dependency
2627
run: if [ $(uname) == "Darwin" ]; then brew install gnu-sed ;fi
27-
- name: run Unit tests.
28-
run: go install github.com/go-delve/delve/cmd/dlv@latest && go test ./... -v -covermode=count -coverprofile=coverage.txt
29-
- name: upload Coverage report to CodeCov
30-
uses: codecov/codecov-action@v3
28+
- name: Run unit tests
29+
run: go install github.com/go-delve/delve/cmd/dlv@latest && go test ./... -v -covermode=count -coverprofile=coverage.txt
30+
- name: Upload Coverage report to CodeCov
31+
uses: codecov/codecov-action@v4
3132
with:
3233
token: ${{ secrets.CODECOV_TOKEN }}
3334
file: ./coverage.txt
3435
verbose: true
3536

3637
push_to_docker_latest:
37-
name: push master code to docker latest image
38+
name: Push master code to docker latest image
3839
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
3940
runs-on: ubuntu-latest
4041
steps:
4142
- name: Set up QEMU
4243
uses: docker/setup-qemu-action@v3
43-
- name: set up Docker Buildx
44+
- name: Set up Docker Buildx
4445
uses: docker/setup-buildx-action@v3
45-
- name: login to DockerHub
46+
- name: Login to DockerHub
4647
uses: docker/login-action@v3
4748
with:
4849
username: ${{ secrets.DOCKERHUB_USERNAME }}
4950
password: ${{ secrets.DOCKERHUB_TOKEN }}
50-
- name: build and push
51+
- name: Build and push
5152
id: docker_build
5253
uses: docker/build-push-action@v5
5354
with:
5455
push: true
5556
platforms: linux/amd64,linux/arm64
5657
tags: cosmtrek/air:latest
57-
- name: show image digest
58+
- name: Show image digest
5859
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/release.yml

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release
1+
name: Release
22

33
on:
44
push:
@@ -7,46 +7,48 @@ on:
77

88
jobs:
99
release:
10-
name: release
10+
name: Release
1111
runs-on: ubuntu-latest
1212
if: startsWith(github.ref, 'refs/tags/v')
1313
steps:
14-
- name: checkout code
15-
uses: actions/checkout@v2
16-
- name: setup Go
17-
uses: actions/setup-go@v2
14+
- name: Check out code
15+
uses: actions/checkout@v4
16+
- name: Setup Go
17+
uses: actions/setup-go@v4
1818
with:
1919
go-version: ^1.22
20-
- name: set GOVERSION
20+
21+
- name: Set GOVERSION
2122
run: echo "GOVERSION=$(go version | sed -r 's/go version go(.*)\ .*/\1/')" >> $GITHUB_ENV
22-
- name: set AirVersion
23+
- name: Set AirVersion
2324
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
24-
- name: show version
25+
- name: Show version
2526
run: echo ${{ env.GOVERSION }} ${{ env.VERSION }}
2627

27-
- name: run GoReleaser
28-
uses: goreleaser/goreleaser-action@v2
28+
- name: Run GoReleaser
29+
uses: goreleaser/goreleaser-action@v5
2930
with:
31+
distribution: goreleaser
3032
version: latest
31-
args: release --rm-dist
33+
args: release --clean
3234
env:
3335
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436

3537
- name: Set up QEMU
3638
uses: docker/setup-qemu-action@v3
37-
- name: set up Docker Buildx
39+
- name: Set up Docker Buildx
3840
uses: docker/setup-buildx-action@v3
39-
- name: login to DockerHub
41+
- name: Login to DockerHub
4042
uses: docker/login-action@v3
4143
with:
4244
username: ${{ secrets.DOCKERHUB_USERNAME }}
4345
password: ${{ secrets.DOCKERHUB_TOKEN }}
44-
- name: push to docker hub
46+
- name: Push to DockerHub
4547
id: docker_build
4648
uses: docker/build-push-action@v5
4749
with:
4850
push: true
4951
platforms: linux/amd64,linux/arm64
5052
tags: cosmtrek/air:${{ env.VERSION }}
51-
- name: show docker image digest
52-
run: echo ${{ steps.docker_build.outputs.digest }}
53+
- name: Show docker image digest
54+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/smoke_test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66

77
jobs:
88
smoke_test_ubuntu:
9-
uses: cosmtrek/air/.github/workflows/smoke_test_reuse_job.yml@add_smoke_test
9+
uses: cosmtrek/air/.github/workflows/smoke_test_reuse_job.yml@master
1010
with:
1111
run_on: ubuntu-latest
1212
smoke_test_macos:
13-
uses: cosmtrek/air/.github/workflows/smoke_test_reuse_job.yml@add_smoke_test
13+
uses: cosmtrek/air/.github/workflows/smoke_test_reuse_job.yml@master
1414
with:
1515
run_on: macos-latest
1616
smoke_test_windows:
17-
uses: cosmtrek/air/.github/workflows/smoke_test_window_reust_job.yml@fix_window_arg_bug
17+
uses: cosmtrek/air/.github/workflows/smoke_test_window_reuse_job.yml@master
1818
with:
19-
run_on: windows-latest
19+
run_on: windows-latest

.github/workflows/smoke_test_reuse_job.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ jobs:
1212
name: smoke_test
1313
runs-on: ${{ inputs.run_on }}
1414
steps:
15-
- name: check out code
16-
uses: actions/checkout@v2
17-
- name: setup Go 1.22
15+
- name: Check out code
16+
uses: actions/checkout@v4
17+
- name: Setup Go
1818
id: go
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v4
2020
with:
2121
go-version: ^1.22
22-
- name: install
22+
- name: Install
2323
run: make install
24-
- name: check rebuild
24+
- name: Check rebuild
2525
id: check_rebuild
2626
working-directory: ./smoke_test/check_rebuild
2727
run: |
2828
nohup air > nohup.out 2> nohup.err < /dev/null &
2929
sleep 15
3030
echo "" >> main.go
3131
sleep 5
32-
cat nohup.out
32+
cat nohup.out
3333
grep "running" nohup.out | wc -l | if [ "$(cat -)" -eq "2" ]; then echo "::set-output name=value::PASS"; else echo "::set-output name=value::FAIL"; fi
3434
- uses: nick-invision/assert-action@v1
3535
with:
3636
expected: "PASS"
37-
actual: ${{ steps.check_rebuild.outputs.value }}
37+
actual: ${{ steps.check_rebuild.outputs.value }}

.github/workflows/smoke_test_window_reust_job.yml .github/workflows/smoke_test_window_reuse_job.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,24 @@ jobs:
1212
name: smoke_test
1313
runs-on: ${{ inputs.run_on }}
1414
steps:
15-
- name: check out code
16-
uses: actions/checkout@v2
17-
- name: setup Go 1.22
15+
- name: Check out code
16+
uses: actions/checkout@v4
17+
- name: Setup Go
1818
id: go
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v4
2020
with:
2121
go-version: ^1.22
22+
2223
- name: Setup Python
23-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v5
2425
with:
2526
python-version: "3.x"
2627
- name: Install depend
2728
run: |
2829
python -m pip install pexpect
29-
- name: install
30+
- name: Install
3031
run: make install
31-
- name: check rebuild
32+
- name: Check rebuild
3233
id: check_rebuild
3334
working-directory: ./smoke_test
3435
run: |

README-zh_cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ P.S. 非常感谢 mattn 的 [PR](https://github.com/cosmtrek/air/pull/1),使
5252

5353
### 使用 `go install`
5454

55-
使用 Go 的版本为 1.16 或更高:
55+
使用 Go 的版本为 1.22 或更高:
5656

5757
```bash
5858
go install github.com/cosmtrek/air@latest

README-zh_tw.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Air 是一個另類的自動重新編譯執行命令列工具,用於開發 Go
3838

3939
### 使用 `go install` (推薦)
4040

41-
需要使用 go 1.18 或更高版本:
41+
需要使用 go 1.22 或更高版本:
4242

4343
```bash
4444
go install github.com/cosmtrek/air@latest

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Use a comma to separate items for arguments that take a list as input:
4242

4343
### Via `go install` (Recommended)
4444

45-
With go 1.18 or higher:
45+
With go 1.22 or higher:
4646

4747
```bash
4848
go install github.com/cosmtrek/air@latest

air_example.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ post_cmd = ["echo 'hello air' > post_cmd.txt"]
1616
bin = "tmp/main"
1717
# Customize binary, can setup environment variables when run your app.
1818
full_bin = "APP_ENV=dev APP_USER=air ./tmp/main"
19+
# Add additional arguments when running binary (bin/full_bin). Will run './tmp/main hello world'.
20+
args_bin = ["hello", "world"]
1921
# Watch these filename extensions.
2022
include_ext = ["go", "tpl", "tmpl", "html"]
2123
# Ignore these filename extensions or directories.
@@ -48,10 +50,8 @@ send_interrupt = false
4850
kill_delay = 500 # nanosecond
4951
# Rerun binary or not
5052
rerun = false
51-
# Delay after each executions
53+
# Delay after each execution
5254
rerun_delay = 500
53-
# Add additional arguments when running binary (bin/full_bin). Will run './tmp/main hello world'.
54-
args_bin = ["hello", "world"]
5555

5656
[log]
5757
# Show log time

go.mod

+21-15
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,33 @@ go 1.22
44

55
require (
66
dario.cat/mergo v1.0.0
7-
github.com/creack/pty v1.1.18
8-
github.com/fatih/color v1.14.1
9-
github.com/fsnotify/fsnotify v1.6.0
10-
github.com/gohugoio/hugo v0.111.3
7+
github.com/creack/pty v1.1.21
8+
github.com/fatih/color v1.16.0
9+
github.com/fsnotify/fsnotify v1.7.0
10+
github.com/gohugoio/hugo v0.123.3
1111
github.com/pelletier/go-toml v1.9.5
12-
github.com/stretchr/testify v1.8.1
12+
github.com/stretchr/testify v1.8.4
1313
)
1414

1515
require (
16-
github.com/bep/godartsass v0.16.0 // indirect
17-
github.com/bep/golibsass v1.1.0 // indirect
18-
github.com/cli/safeexec v1.0.0 // indirect
16+
github.com/bep/godartsass v1.2.0 // indirect
17+
github.com/bep/godartsass/v2 v2.0.0 // indirect
18+
github.com/bep/golibsass v1.1.1 // indirect
19+
github.com/cli/safeexec v1.0.1 // indirect
1920
github.com/davecgh/go-spew v1.1.1 // indirect
21+
github.com/gobwas/glob v0.2.3 // indirect
2022
github.com/mattn/go-colorable v0.1.13 // indirect
21-
github.com/mattn/go-isatty v0.0.17 // indirect
22-
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
23+
github.com/mattn/go-isatty v0.0.20 // indirect
24+
github.com/mitchellh/hashstructure v1.1.0 // indirect
25+
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
2326
github.com/pmezard/go-difflib v1.0.0 // indirect
24-
github.com/spf13/afero v1.9.3 // indirect
25-
github.com/tdewolff/parse/v2 v2.6.5 // indirect
26-
golang.org/x/sys v0.5.0 // indirect
27-
golang.org/x/text v0.7.0 // indirect
28-
google.golang.org/protobuf v1.28.1 // indirect
27+
github.com/spf13/afero v1.11.0 // indirect
28+
github.com/spf13/cast v1.6.0 // indirect
29+
github.com/tdewolff/parse/v2 v2.7.12 // indirect
30+
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 // indirect
31+
golang.org/x/sys v0.17.0 // indirect
32+
golang.org/x/text v0.14.0 // indirect
33+
google.golang.org/protobuf v1.31.0 // indirect
34+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
2935
gopkg.in/yaml.v3 v3.0.1 // indirect
3036
)

0 commit comments

Comments
 (0)