Skip to content

docs: v0.11.0

docs: v0.11.0 #249

Workflow file for this run

name: Continuous Integration Pipeline
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
paths-ignore:
- "**/*.md"
- docs/**
- examples/**
env:
GORELEASER_VERSION: v2.2.0
jobs:
lint:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
cache: false
- name: Set golangci-lint Cache Key
id: create-sha
run: |
echo "GOLANGCILINT_SHA=$(cat ./tools/GOLANGCI_LINT_VERSION | sha256sum - | awk '{ print $1 }')" >> $GITHUB_ENV
- name: Setup golangci-lint Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
./tools/bin
key: ${{ runner.os }}-go-${{ env.GOLANGCILINT_SHA }}
restore-keys: |
${{ runner.os }}-go-${{ env.GOLANGCILINT_SHA }}
- name: Run Lint CI
run: make ci-lint GOLANGCI_LINT_MODE="github-actions"
test:
name: Testing on ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
env:
GOEXPERIMENT: nocoverageredesign
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
- name: Run Test Coverage
run: make ci
build:
name: Build for Supported Architectures
runs-on: ubuntu-latest
needs:
- lint
- test
if: github.event_name != 'push'
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
- name: Setup Goreleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: ${{ env.GORELEASER_VERSION }}
install-only: true
- name: Run Build Multiarchitecture
run: make build-multiarch
publish-release:
runs-on: ubuntu-latest
needs:
- lint
- test
if: github.event_name == 'push'
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
fetch-depth: 0
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod
- name: Setup Goreleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
with:
version: ${{ env.GORELEASER_VERSION }}
install-only: true
- name: Set Snapshot Release Environment
if: github.ref_type == 'branch'
run: |
echo "SNAPSHOT_RELEASE=1" >> $GITHUB_ENV
- name: Run Goreleaser
run: make ci-release SNAPSHOT_RELEASE=${SNAPSHOT_RELEASE}
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Upload Binaries Artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: artifacts
path: bin/
publish-docker:
runs-on: ubuntu-latest
needs:
- publish-release
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
show-progress: false
- name: Download Binaries
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: artifacts
path: bin/
- name: Restore Executable Permissions
run: |
find ./bin/{darwin,linux} -type f -exec chmod +x {} \;
- name: Docker Login to GitHub Repository
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.BOT_DOCKER_USERNAME }}
password: ${{ secrets.BOT_DOCKER_TOKEN }}
- name: Setup QEMU
run: make docker-setup-multiarch
- name: Setup Buildx Context
id: buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Build Latest Image
run: make ci-docker BUILDX_CONTEXT=${{ steps.buildx.outputs.name }}