Skip to content

v0.4.0

v0.4.0 #11

Workflow file for this run

name: "Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BIFROEST_VENDOR: "Engity GmbH"
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
container:
image: ghcr.io/engity-com/build-images/go
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Go
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache images dependencies
uses: actions/cache@v4
with:
path: .cache/dependencies/images
key: images-dependencies
restore-keys: images-dependencies
- name: Git configure
run: |
git config --global --add safe.directory $(pwd)
- name: Install dependencies
run: |
go mod download
- name: Test
run: |
mkdir -p var
go test -v ./...
- name: Build/Release
run: |
go run ./cmd/build build --log.colorMode=always
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: Cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ hashFiles('docs/requirements.txt') }}
- name: Setup Git
run: |
git config user.email "[email protected]"
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