-
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.
Signed-off-by: Oleg Kovalov <[email protected]>
- Loading branch information
1 parent
a16ba24
commit 7e12562
Showing
2 changed files
with
101 additions
and
1 deletion.
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,55 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag to create' | ||
required: true | ||
default: 'v0.0.0' | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build & Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.16 | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: go test -v -race -coverprofile=coverage.txt ./... | ||
|
||
- name: Upload Coverage | ||
uses: codecov/codecov-action@v1 | ||
continue-on-error: true | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
file: ./coverage.txt | ||
fail_ci_if_error: false | ||
|
||
release: | ||
if: github.event_name == 'workflow_dispatch' | ||
|
||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Checkout with tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- name: Create release | ||
run: | | ||
git log --format="%C(auto) %H %s" `git tag --sort=-committerdate | head -1`...HEAD > changelog.txt | ||
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token | ||
gh release create ${{ github.event.inputs.tag }} -t ${{ github.event.inputs.tag }} -F changelog.txt |
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 +1,46 @@ | ||
# lexorank | ||
# lexorank | ||
|
||
[![build-img]][build-url] | ||
[![pkg-img]][pkg-url] | ||
[![reportcard-img]][reportcard-url] | ||
[![coverage-img]][coverage-url] | ||
|
||
## Rationale | ||
|
||
TODO | ||
|
||
## Features | ||
|
||
* Simple API. | ||
* Clean and tested code. | ||
* Dependency-free. | ||
|
||
## Install | ||
|
||
Go version 1.16+ | ||
|
||
``` | ||
go get github.com/cristalhq/lexorank | ||
``` | ||
|
||
## Example | ||
|
||
```go | ||
``` | ||
|
||
## Documentation | ||
|
||
See [these docs][pkg-url]. | ||
|
||
## License | ||
|
||
[MIT License](LICENSE). | ||
|
||
[build-img]: https://github.com/cristalhq/lexorank/workflows/build/badge.svg | ||
[build-url]: https://github.com/cristalhq/lexorank/actions | ||
[pkg-img]: https://pkg.go.dev/badge/cristalhq/lexorank | ||
[pkg-url]: https://pkg.go.dev/github.com/cristalhq/lexorank | ||
[reportcard-img]: https://goreportcard.com/badge/cristalhq/lexorank | ||
[reportcard-url]: https://goreportcard.com/report/cristalhq/lexorank | ||
[coverage-img]: https://codecov.io/gh/cristalhq/lexorank/branch/main/graph/badge.svg | ||
[coverage-url]: https://codecov.io/gh/cristalhq/lexorank |