Skip to content

chore(deps): update k1low/octocov-action action to v1 #189

chore(deps): update k1low/octocov-action action to v1

chore(deps): update k1low/octocov-action action to v1 #189

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: lint
uses: reviewdog/[email protected]
with:
golangci_lint_flags: '--config=.golangci.yml'
test:
strategy:
matrix:
go_version:
- '1.19.x'
- '1.20.x'
- '1.21.x'
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version: ${{ matrix.go_version }}
cache: true
- run: go mod download
- name: test
run: go test -v -race -coverprofile=cover.out ./...
- uses: actions/[email protected]
with:
name: coverage
path: ./cover.out
if-no-files-found: error
report-coverage:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
pull-requests: write
needs:
- test
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: coverage
- uses: k1LoW/[email protected]
determine_release:
permissions:
contents: write
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
outputs:
will_release: ${{ steps.determine_release.outputs.new_release_published }}
steps:
- uses: actions/[email protected]
- id: determine_release
uses: cycjimmy/[email protected]
with:
dry_run: true
env:
GITHUB_TOKEN: ${{ github.token }}
release:
permissions:
contents: write
runs-on: ubuntu-latest
needs:
- test
- lint
- determine_release
if: ${{ needs.determine_release.outputs.will_release }}
environment: stable
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: cycjimmy/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}