Skip to content

Merge pull request #415 from yarpc/vitalii/release-0-23-0 #581

Merge pull request #415 from yarpc/vitalii/release-0-23-0

Merge pull request #415 from yarpc/vitalii/release-0-23-0 #581

Workflow file for this run

name: Go
on:
push:
branches: ['*']
tags: ['v*']
pull_request:
branches: ['*']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.18.x
- name: Checkout code
uses: actions/checkout@v2
- name: Load cached dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install
run: make install
- name: Test
run: make test_ci
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v1
release:
runs-on: ubuntu-latest
# Only release pushes of tags starting with v and if the build succeeded.
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [build]
steps:
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.18.x
- name: Checkout code
uses: actions/checkout@v2
- name: Load cached dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install
run: make install
- name: Release
env:
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./scripts/release.sh ${{ github.ref }}