Skip to content

Commit

Permalink
Merge pull request #6 from caiyunapp/main
Browse files Browse the repository at this point in the history
Feature: Add release workflow
  • Loading branch information
StrayDragon authored Aug 26, 2021
2 parents 119d3b1 + c63567e commit b1f6792
Show file tree
Hide file tree
Showing 2 changed files with 51 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:
branches:
- 'main'
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
project_name: actions-feishu

env:
- GO111MODULE=on

build:
env:
- CGO_ENABLED=0
main: main.go
binary: feishu
goos:
- darwin
- linux
- windows
goarch:
- amd64
ignore:

archives:
- name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}"
format: tar.gz
format_overrides:
- goos: windows
format: zip

0 comments on commit b1f6792

Please sign in to comment.