Skip to content
Snippets Groups Projects
Commit 2ce56b55 authored by Christoph Witzko's avatar Christoph Witzko
Browse files

chore(ci): initial

parent f4598e1f
No related branches found
No related tags found
No related merge requests found
name: CI
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s
./bin/golangci-lint run -v
build:
runs-on: ${{ matrix.os }}
needs: lint
strategy:
fail-fast: true
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Build
run: go build ./cmd/commit-analyzer-cz/
- name: Test
run: go test -v ./...
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.14
- run: echo "::add-path::~/go/bin"
- name: Get release dependencies
run: |
go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
- uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ghr: true
- run: |
gox -parallel 4 -osarch="linux/amd64 darwin/amd64 linux/arm windows/amd6" -ldflags="-extldflags '-static' -s -w" -output="bin/{{.Dir}}_v${{steps.semrel.outputs.version}}_{{.OS}}_{{.Arch}}" ./cmd/commit-analyzer-cz/
if: steps.semrel.outputs.version != ''
- run: ghr $(cat .ghr) bin/
if: steps.semrel.outputs.version != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment