Skip to content

chore(roi): release v0.21.0 #242

chore(roi): release v0.21.0

chore(roi): release v0.21.0 #242

Workflow file for this run

name: Release
on:
push:
branches: [main]
tags:
- "webapp-v*"
- "assistant-v*"
- "roi-v*"
- "grid-v*"
permissions:
contents: write
packages: write
attestations: write
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
webapp: ${{ steps.filter.outputs.webapp }}
assistant: ${{ steps.filter.outputs.assistant }}
roi: ${{ steps.filter.outputs.roi }}
grid: ${{ steps.filter.outputs.grid }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
webapp:
- 'apps/webapp/**'
- 'packages/**'
assistant:
- 'apps/assistant/**'
- 'packages/**'
roi:
- 'apps/roi/**'
- 'packages/**'
grid:
- 'apps/grid/**'
- 'packages/**'
build-webapp:
name: Build Webapp
runs-on: ubuntu-latest
needs: [changes]
if: |
needs.changes.outputs.webapp == 'true' ||
startsWith(github.ref, 'refs/tags/webapp-v')
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get version
id: version
run: |
VERSION=$(node -p "require('./apps/webapp/package.json').version")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Determine image tag
id: vars
run: |
if [[ "${GITHUB_REF}" == refs/tags/webapp-v* ]]; then
TAG_NAME=${GITHUB_REF#refs/tags/webapp-v}
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "tag=dev" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build webapp
run: pnpm --filter @celine-eu/webapp build
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
IMAGE=ghcr.io/${{ github.repository_owner }}/celine-frontend-webapp
docker build -f apps/webapp/Dockerfile -t $IMAGE:${{ steps.vars.outputs.tag }} .
docker push $IMAGE:${{ steps.vars.outputs.tag }}
if [[ "${{ steps.vars.outputs.is_release }}" == "true" ]]; then
docker tag $IMAGE:${{ steps.vars.outputs.tag }} $IMAGE:latest
docker push $IMAGE:latest
fi
build-assistant:
name: Build Assistant
runs-on: ubuntu-latest
needs: [changes]
if: |
needs.changes.outputs.assistant == 'true' ||
startsWith(github.ref, 'refs/tags/assistant-v')
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get version
id: version
run: |
VERSION=$(node -p "require('./apps/assistant/package.json').version")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Determine image tag
id: vars
run: |
if [[ "${GITHUB_REF}" == refs/tags/assistant-v* ]]; then
TAG_NAME=${GITHUB_REF#refs/tags/assistant-v}
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "tag=dev" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build assistant
run: pnpm --filter @celine-eu/assistant build
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
IMAGE=ghcr.io/${{ github.repository_owner }}/celine-frontend-assistant
docker build -f apps/assistant/Dockerfile -t $IMAGE:${{ steps.vars.outputs.tag }} .
docker push $IMAGE:${{ steps.vars.outputs.tag }}
if [[ "${{ steps.vars.outputs.is_release }}" == "true" ]]; then
docker tag $IMAGE:${{ steps.vars.outputs.tag }} $IMAGE:latest
docker push $IMAGE:latest
fi
build-roi:
name: Build ROI
runs-on: ubuntu-latest
needs: [changes]
if: |
needs.changes.outputs.roi == 'true' ||
startsWith(github.ref, 'refs/tags/roi-v')
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get version
id: version
run: |
VERSION=$(node -p "require('./apps/roi/package.json').version")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Determine image tag
id: vars
run: |
if [[ "${GITHUB_REF}" == refs/tags/roi-v* ]]; then
TAG_NAME=${GITHUB_REF#refs/tags/roi-v}
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "tag=dev" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build roi
run: pnpm --filter @celine-eu/roi build
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
IMAGE=ghcr.io/${{ github.repository_owner }}/celine-frontend-roi
docker build -f apps/roi/Dockerfile -t $IMAGE:${{ steps.vars.outputs.tag }} .
docker push $IMAGE:${{ steps.vars.outputs.tag }}
if [[ "${{ steps.vars.outputs.is_release }}" == "true" ]]; then
docker tag $IMAGE:${{ steps.vars.outputs.tag }} $IMAGE:latest
docker push $IMAGE:latest
fi
build-grid:
name: Build Grid
runs-on: ubuntu-latest
needs: [changes]
if: |
needs.changes.outputs.grid == 'true' ||
startsWith(github.ref, 'refs/tags/grid-v')
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get version
id: version
run: |
VERSION=$(node -p "require('./apps/grid/package.json').version")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Determine image tag
id: vars
run: |
if [[ "${GITHUB_REF}" == refs/tags/grid-v* ]]; then
TAG_NAME=${GITHUB_REF#refs/tags/grid-v}
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "tag=dev" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build grid
run: pnpm --filter @celine-eu/grid build
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
IMAGE=ghcr.io/${{ github.repository_owner }}/celine-frontend-grid
docker build -f apps/grid/Dockerfile -t $IMAGE:${{ steps.vars.outputs.tag }} .
docker push $IMAGE:${{ steps.vars.outputs.tag }}
if [[ "${{ steps.vars.outputs.is_release }}" == "true" ]]; then
docker tag $IMAGE:${{ steps.vars.outputs.tag }} $IMAGE:latest
docker push $IMAGE:latest
fi