Skip to content

Commit

Permalink
Add release Action
Browse files Browse the repository at this point in the history
使用 GitHub Action 自动编译发布可执行文件
  • Loading branch information
julydate authored Jan 22, 2022
1 parent 7a87d8d commit b4ef07e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build Release

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
- name: Test
run: go test -v .
- name: Build
run: go build -v .
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b4ef07e

Please # to comment.