File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Release Golang
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*" # Chỉ chạy khi có tag mới dạng v1.0.0
7
+
8
+ permissions :
9
+ contents : write
10
+ packages : write
11
+
12
+ jobs :
13
+ build :
14
+ name : Build and Release
15
+ runs-on : ubuntu-latest
16
+
17
+ strategy :
18
+ matrix :
19
+ goos : [linux, windows, darwin]
20
+ goarch : [amd64, arm64]
21
+
22
+ steps :
23
+ - name : Checkout code
24
+ uses : actions/checkout@v4
25
+
26
+ - name : Set up Go
27
+ uses : actions/setup-go@v4
28
+ with :
29
+ go-version : 1.21
30
+
31
+ - name : Build & Upload to GitHub Releases
32
+ uses :
wangyoucao577/[email protected]
33
+ with :
34
+ github_token : ${{ secrets.GITHUB_TOKEN }}
35
+ goos : ${{ matrix.goos }}
36
+ goarch : ${{ matrix.goarch }}
37
+ binary_name : tts
38
+ compress : zip
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package main
3
3
import (
4
4
"bufio"
5
5
"fmt"
6
- "io/ioutil"
7
6
"os"
8
7
9
8
"github.com/spf13/pflag"
@@ -37,7 +36,7 @@ func main() {
37
36
reader := bufio .NewReader (os .Stdin )
38
37
* text , _ = reader .ReadString ('\n' )
39
38
} else {
40
- data , _ := ioutil .ReadFile (* file )
39
+ data , _ := os .ReadFile (* file )
41
40
* text = string (data )
42
41
}
43
42
}
You can’t perform that action at this time.
0 commit comments