Skip to content

[StepSecurity] Apply security best practices (#359) #985

[StepSecurity] Apply security best practices (#359)

[StepSecurity] Apply security best practices (#359) #985

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
ci:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: '1.23'
- name: Build
run: make ci
- name: Upload coverage
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: coverage-${{ matrix.os }}
path: coverage.*
- run: goreleaser release --clean --snapshot
if: ${{ runner.os == 'Linux' }}
- name: Upload dist
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: dist-${{ matrix.os }}
path: dist
- name: Upload coverage to Codecov
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
with:
fail_ci_if_error: true
files: ./coverage.out
token: ${{ secrets.CODECOV_TOKEN }}