Skip to content

Release

Release #6

Workflow file for this run

name: "Release"
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
version:
description: "Version to be released (syntax: v<major>.<minor>.<patch>)"
required: true
jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Install Ubuntu dependencies
run: sudo apt install libpam0g-dev
- name: Install Syft
uses: anchore/sbom-action/download-syft@v0.17.2
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: |
mkdir -p var
go test -v ./...
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BIFROEST_VENDOR: engity
documentation:
name: "Documentation"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Setup Git
run: |
git config user.email "info@engity.com"
git config user.name "Engity Bot"
- name: Deploy
run: |
VERSION_INPUT="${{ github.event.inputs.version }}"
VERSION_REF="${{ github.ref }}"
export VERSION=$(test -z "${VERSION_INPUT}" && echo $(echo "${VERSION_REF}" | sed -e "s#^refs/tags/##g" | sed -e "s#^v##g") || echo "${VERSION_INPUT}")
echo "Version: ${VERSION}"
mike deploy --push --update-aliases "${VERSION}" latest