Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

build(deps): Bump actions/cache from 3 to 4 #34

build(deps): Bump actions/cache from 3 to 4

build(deps): Bump actions/cache from 3 to 4 #34

Workflow file for this run

name: build
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test -v -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./...
- uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
- uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
with:
version: latest
distribution: goreleaser-pro
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}