Skip to content

Commit

Permalink
build: create release when tag pushed.
Browse files Browse the repository at this point in the history
  • Loading branch information
cangzhang committed Sep 8, 2021
1 parent e257b26 commit 7be8d30
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: v1.17

- name: Build
run: |
go build -ldflags="-X main.tagName=$(git describe --tags --abbrev=0) -X main.sha=$(git rev-parse --short HEAD) -H=windowsgui" -o dist/
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.exe"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7be8d30

Please sign in to comment.