Skip to content

Commit

Permalink
feat(ci): auto build and publish and fight with grammar police
Browse files Browse the repository at this point in the history
  • Loading branch information
asjdf committed Apr 16, 2022
1 parent 19fdab8 commit d253172
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 25 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 发版
on:
workflow_dispatch:
inputs:
build:
description: '发版,请输入true'
required: true
default: 'true'
# version_description:
# description: '输入版本描述'
# required: true
# default: '升级内容:性能优化 | bug修复'

jobs:
build:
name: 编译并发布版本
runs-on: ubuntu-latest
if: github.event.inputs.build == 'true'
steps:
- name: 准备代码
uses: actions/checkout@v2

- name: 准备编译环境
uses: actions/setup-go@v3
with:
go-version: '1.17'

- name: 运行GoReleaser发版
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ hdu_cli
hdu-cli
.hdu_cli.yaml
.idea
/vendor
/vendor
dist/
2 changes: 1 addition & 1 deletion .hdu-cli.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
net:
auth:
# i-HDU wifi login
# i-HDU Wi-Fi login
#
# Manually method
# username always is your student id like 20051101
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ require (
require (
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/gopherjs/gopherjs v0.0.0-20211111143520-d0d5ecc1a356 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
Expand Down
Loading

0 comments on commit d253172

Please sign in to comment.