-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
593 additions
and
67 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,44 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'beta' | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version (No "v")' | ||
required: true | ||
type: string | ||
pull_request: | ||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19 | ||
- | ||
name: Tests | ||
run: | | ||
go mod tidy | ||
go test -v ./... | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
with: | ||
version: "v1.17.2" | ||
args: release --rm-dist --skip-validate | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*.exe | ||
go.sum | ||
*.log | ||
.idea | ||
*.opq | ||
dist | ||
config.yaml |
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,89 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- id: "Yui" | ||
main: ./ | ||
env: | ||
- CGO_ENABLED=0 | ||
goarm: | ||
- 6 | ||
- 7 | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- 386 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
ignore: | ||
- goos: android | ||
goarch: arm | ||
- goos: darwin | ||
goarch: 386 | ||
- goos: darwin | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm64 | ||
- goos: android | ||
goarch: 386 | ||
- id: "Yui-cli" | ||
binary: "Yui-cli" | ||
main: ./plugin/builder | ||
env: | ||
- CGO_ENABLED=0 | ||
goarm: | ||
- 6 | ||
- 7 | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- 386 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
ignore: | ||
- goos: android | ||
goarch: arm | ||
- goos: darwin | ||
goarch: 386 | ||
- goos: darwin | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm | ||
- goos: windows | ||
goarch: arm64 | ||
- goos: android | ||
goarch: 386 | ||
archives: | ||
- | ||
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
files: | ||
- config.yaml.example | ||
- LICENSE | ||
release: | ||
prerelease: auto | ||
checksum: | ||
name_template: 'checksums.txt' | ||
project_name: Yui | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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,7 @@ | ||
httpproxy: http://127.0.0.1:7890 # 插件 HTTP 服务时会使用的 Proxy | ||
opqurl: http://127.0.0.1:8086 # OPQ 的地址 | ||
admin: | ||
- 0 # 管理员 | ||
plugin: | ||
env: | ||
test: opqbot # 环境变量 将会传递到插件内 |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.