-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f15fb7
commit eb27e69
Showing
1 changed file
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,11 +37,18 @@ jobs: | |
cd .. | ||
cp -r src/admin/dist/ dist/admin | ||
- uses: wangyoucao577/[email protected] | ||
- name: build | ||
uses: actions/setup-go@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件 | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: 1.21 # 可以指定编译使用的 Golang 版本 | ||
binary_name: "movie" # 可以指定二进制文件的名称 | ||
extra_files: README.md config.ini # 需要包含的额外文件 | ||
go-version: 'stable' | ||
run: | | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o movie-${{ github.ref }} | ||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o movie-${{ github.ref }}.exe | ||
- name: Upload assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | ||
movie-${{ github.ref }} | ||
movie-${{ github.ref }}.exe | ||
prerelease: false |