initialize repository

This commit is contained in:
itchyny 2020-01-07 19:52:49 +09:00
commit ac88fa99fe
9 changed files with 160 additions and 0 deletions

20
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,20 @@
name: CI
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.x
- name: Test
run: make test
- name: Lint
run: |
export PATH=$PATH:$(go env GOPATH)/bin # will be removed
make lint

36
.github/workflows/release.yaml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.x
- name: Cross build
run: |
export PATH=$PATH:$(go env GOPATH)/bin # remove when actions/setup-go does this
make cross
- name: Create Release
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- name: Upload
run: |
export PATH=$PATH:$(go env GOPATH)/bin # remove when actions/setup-go does this
make upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}