Skip to content

Update documentation and normalizes code comments for attribution (#140) #396

Update documentation and normalizes code comments for attribution (#140)

Update documentation and normalizes code comments for attribution (#140) #396

Workflow file for this run

name: CI
on:
push:
branches:
- main
- 'release/**'
tags:
- v*
pull_request:
branches:
- main
- 'release/**'
permissions:
contents: write
id-token: write
packages: write
jobs:
#
# golangci-lint
#
linters:
name: Linters
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
go-version: [1.18]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.46
args: --timeout=20m
#
# Project checks
#
project:
name: Project Checks
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
-
uses: actions/setup-go@v3
with:
go-version: 1.18
-
uses: actions/checkout@v3
with:
path: src/github.com/emporous/emporous-go
-
name: verify go modules and vendor directory
run: |
make vendor
working-directory: src/github.com/emporous/emporous-go
-
name: running unit tests
run: |
make test-unit
working-directory: src/github.com/emporous/emporous-go
-
name: running sanity checks
run: |
make sanity
working-directory: src/github.com/emporous/emporous-go
# Release
release:
needs: [linters, project]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
-
name: Checkout Repo
uses: actions/checkout@v3
id: clone
with:
fetch-depth: 0
-
name: Install Cosign
uses: sigstore/[email protected]
id: cosign
-
name: Install SBOM
uses: anchore/sbom-action/[email protected]
id: sbom
-
name: Install QEMU
uses: docker/setup-qemu-action@v2
id: qemu
-
name: Install BUILDX
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
-
name: Install Go
uses: actions/setup-go@v3
id: go
with:
go-version: 1.18
-
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Run GoReleaser
id: goreleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: v1.10.2
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}