Skip to content

fix(deps): update module github.com/spf13/cobra to v1.8.1 #196

fix(deps): update module github.com/spf13/cobra to v1.8.1

fix(deps): update module github.com/spf13/cobra to v1.8.1 #196

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
types:
- opened
- reopened
- edited
jobs:
build:
runs-on: ubuntu-latest
steps:
# checkout
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# setup go
- name: go
uses: actions/setup-go@v1
with:
go-version: 1.14
- run: go version
- run: go env
# cache
- name: cache
uses: actions/cache@v1
with:
path: vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# vendor
- name: vendor
run: |
make vendor
# build
- name: build
if: startsWith(github.ref, 'refs/tags/') == false
run: |
make snapshot
# get tag name
- name: tag_name
if: startsWith(github.ref, 'refs/tags/')
uses: olegtarasov/get-tag@v2
with:
tagRegex: "v?(.+)"
# publish
- name: publish
if: startsWith(github.ref, 'refs/tags/')
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}
run: |
make publish
# artifacts
- name: artifact_linux
uses: actions/upload-artifact@v2-preview
with:
name: build_linux
path: dist/*linux*
- name: artifact_darwin
uses: actions/upload-artifact@v2-preview
with:
name: build_darwin
path: dist/*darwin*