Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
minhvh-nals committed Feb 8, 2025
1 parent 8e1f607 commit adf47c4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Release Golang

on:
push:
tags:
- "v*" # Chỉ chạy khi có tag mới dạng v1.0.0

permissions:
contents: write
packages: write

jobs:
build:
name: Build and Release
runs-on: ubuntu-latest

strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Build & Upload to GitHub Releases
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: tts
compress: zip
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"bufio"
"fmt"
"io/ioutil"
"os"

"github.com/spf13/pflag"
Expand Down Expand Up @@ -37,7 +36,7 @@ func main() {
reader := bufio.NewReader(os.Stdin)
*text, _ = reader.ReadString('\n')
} else {
data, _ := ioutil.ReadFile(*file)
data, _ := os.ReadFile(*file)
*text = string(data)
}
}
Expand Down

0 comments on commit adf47c4

Please sign in to comment.