Skip to content

Replace PostgreSQL array types with JSON serialization for MariaDB co… #8

Replace PostgreSQL array types with JSON serialization for MariaDB co…

Replace PostgreSQL array types with JSON serialization for MariaDB co… #8

Workflow file for this run

name: Full Release
permissions:
contents: write
id-token: write
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
name: Build Application
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
# build frontend
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install Dependencies
run: |
cd frontend
yarn install
- name: Build Frontend
run: |
export VITE_BACKEND_VERSION=$(git tag --sort=-creatordate | sed -n '1p' | sed 's/^v//')
cd frontend
yarn build
- name: Copy Frontend
run: |
rm -rf apiserver/frontend/dist
cp -r frontend/dist apiserver/frontend/dist
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.25
check-latest: true
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
with:
distribution: goreleaser
version: latest
args: build --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
dist/
frontend/dist/
retention-days: 1
release-canary:
runs-on: ubuntu-latest
environment: canary
name: Release to Canary
needs: build
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: apiserver
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.25
check-latest: true
cache: true
- name: Run GoReleaser for GitHub Release
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 #v6.2.1
with:
distribution: goreleaser
version: latest
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update changelog
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
run: |
changelog=$(echo -e "## Changelog\n")
latestTag=$(git tag --sort=-creatordate | sed -n '1p')
previousTag=$(git tag --sort=-creatordate | sed -n '2p')
echo "Evaluating backend repo:"
echo "Latest tag: $latestTag"
echo "Previous tag: $previousTag"
url="https://github.com/${{ github.repository }}/compare/$previousTag...$latestTag"
changelog+=$(echo -e "\n### Changes in [backend]($url)\n\n$(git log --no-merges --pretty=format:"* %s" $previousTag...$latestTag)")
echo "Updating changelog"
gh release edit "$latestTag" --notes "$changelog"
- name: Set up QEMU
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 #v3.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca #v3.9.0
- name: Azure Login with OIDC
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Log in to Azure Container Registry
run: az acr login --name ${{ secrets.ACR_NAME }}
- name: Build and push API image
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 #v6.13.0
with:
context: ./apiserver
file: ./apiserver/Dockerfile
push: true
tags: ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:canary, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:${{ github.ref_name }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
RELEASE_TAG=${{github.ref_name}}
- name: Build and push MCP image
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 #v6.13.0
with:
context: ./mcpserver
file: ./mcpserver/Dockerfile
push: true
tags: ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:canary, ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:${{ github.ref_name }}
platforms: linux/amd64
release-production:
runs-on: ubuntu-latest
environment: stable
name: Promote to Production Release
needs: release-canary
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Promote GitHub Release to Production
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the current tag
TAG="${{ github.ref_name }}"
echo "Promoting release $TAG to production"
# Update the release to remove prerelease flag
gh release edit "$TAG" --prerelease=false --latest
echo "Successfully promoted $TAG to production release"
- name: Set up QEMU
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 #v3.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca #v3.9.0
- name: Azure Login with OIDC
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Log in to ACR
run: az acr login --name ${{ secrets.ACR_NAME }}
- name: Push API image tags
run: |
# Promote multi-platform image manifest from canary to production tags
docker buildx imagetools create \
--tag ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:release \
${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-api:${{ github.ref_name }}
- name: Push MCP image tags
run: |
# Promote multi-platform image manifest from canary to production tags
docker buildx imagetools create \
--tag ${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:release \
${{ secrets.ACR_NAME }}.azurecr.io/task-wizard-mcp:${{ github.ref_name }}