-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create workflow go.yml & update readme
- Loading branch information
Showing
2 changed files
with
48 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: Go | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'tag name' | ||
required: true | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
|
||
- run: go build -o bin/table-export_linux_amd64 . | ||
- run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/table-export_amd64.exe . | ||
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o bin/table-export_darwin_amd64 . | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.tag_name }} | ||
release_name: Tag:${{ github.event.inputs.tag_name }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: # 将下述可执行文件 release 上去 | ||
tag_name: ${{ github.event.inputs.tag_name }} | ||
files: bin/* | ||
draft: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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