Skip to content

Commit adf47c4

Browse files
author
Vo Hoang Minh
committed
up
1 parent 8e1f607 commit adf47c4

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"bufio"
55
"fmt"
6-
"io/ioutil"
76
"os"
87

98
"github.com/spf13/pflag"
@@ -37,7 +36,7 @@ func main() {
3736
reader := bufio.NewReader(os.Stdin)
3837
*text, _ = reader.ReadString('\n')
3938
} else {
40-
data, _ := ioutil.ReadFile(*file)
39+
data, _ := os.ReadFile(*file)
4140
*text = string(data)
4241
}
4342
}

0 commit comments

Comments
 (0)