-
Notifications
You must be signed in to change notification settings - Fork 33
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
1 parent
b506f24
commit 137cadc
Showing
44 changed files
with
2,839 additions
and
2,326 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "21:00" | ||
timezone: Asia/Shanghai | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "21:00" | ||
timezone: Asia/Shanghai | ||
open-pull-requests-limit: 10 |
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: CI | ||
on: [ push, pull_request ] | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1' | ||
|
||
- name: Unit Test | ||
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
fail_ci_if_error: true | ||
flags: unittests | ||
verbose: true | ||
|
||
- name: Integration Test | ||
run: | | ||
go run . -d -c my_token.example.yaml | ||
curl -sfL https://raw.githubusercontent.com/polyrabbit/my-token/master/install.sh | bash -s -- -d #Ensure download script works | ||
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
version: latest | ||
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,48 @@ | ||
project_name: MyToken | ||
release: | ||
github: | ||
owner: polyrabbit | ||
name: my-token | ||
|
||
mode: replace | ||
|
||
builds: | ||
- id: "mt-build" | ||
binary: mt | ||
flags: | ||
- -v | ||
|
||
ldflags: | ||
- -X github.com/polyrabbit/my-token/config.Rev={{.ShortCommit}} -X github.com/polyrabbit/my-token/config.Version={{.Version}} -X github.com/polyrabbit/my-token/config.Date={{.Date}} | ||
|
||
# GOOS list to build for. | ||
# For more info refer to: https://golang.org/doc/install/source#environment | ||
# Defaults are darwin and linux. | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
|
||
# List of combinations of GOOS + GOARCH + GOARM to ignore. | ||
# Default is empty. | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
- goos: linux | ||
goarch: arm | ||
goarm: 7 | ||
- goarm: mips64 | ||
gomips: hardfloat | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^tests:' | ||
|
||
archives: | ||
- name_template: "mt_{{ .Version }}_{{ .Os }}_{{ .Arch }}" |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.