Skip to content

Commit

Permalink
Other useful things
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Kovalov <[email protected]>
  • Loading branch information
cristaloleg committed Jun 28, 2021
1 parent a16ba24 commit 7e12562
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/build.yml
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
47 changes: 46 additions & 1 deletion README.md
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

0 comments on commit 7e12562

Please sign in to comment.