Skip to content

release: bump version to 0.2.8 #16

release: bump version to 0.2.8

release: bump version to 0.2.8 #16

Workflow file for this run

name: Release
on:
push:
branches: [main]
paths: [VERSION]
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
preflight:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Read version
id: version
run: echo "version=$(cat VERSION | tr -d '[:space:]')" >> "$GITHUB_OUTPUT"
- name: Check tag does not exist
run: |
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
echo "::error::Tag v${{ steps.version.outputs.version }} already exists"
exit 1
fi
build:
needs: preflight
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push frontend image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/${{ matrix.arch }}
push: true
provenance: false
build-args: |
VITE_API_URL=
tags: |
ghcr.io/${{ github.repository }}:${{ needs.preflight.outputs.version }}-${{ matrix.arch }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
cache-from: type=gha,scope=${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
manifest:
needs: [build, preflight]
runs-on: ubuntu-latest
steps:
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create multi-arch manifest
run: |
docker buildx imagetools create \
-t ghcr.io/${{ github.repository }}:${{ needs.preflight.outputs.version }} \
-t ghcr.io/${{ github.repository }}:latest \
ghcr.io/${{ github.repository }}:${{ needs.preflight.outputs.version }}-amd64 \
ghcr.io/${{ github.repository }}:${{ needs.preflight.outputs.version }}-arm64
release:
needs: [manifest, preflight]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create git tag
run: |
git tag "v${{ needs.preflight.outputs.version }}"
git push origin "v${{ needs.preflight.outputs.version }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.preflight.outputs.version }}
name: v${{ needs.preflight.outputs.version }}
generate_release_notes: true