Skip to content

Release v0.0.7

Release v0.0.7 #1

Workflow file for this run

name: Build artifact and package
on:
release:
types: [released]
workflow_dispatch:
jobs:
artifact:
runs-on: ubuntu-22.04
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Cache build frontend
uses: actions/cache@v3
id: cache-build-frontend
with:
path: apps/frontend
key: ${{ runner.os }}-frontend-${{ github.sha }}
- name: Cache build backend
uses: actions/cache@v3
id: cache-build-backend
with:
path: apps/backend
key: ${{ runner.os }}-backend-${{ github.sha }}
- name: Compress files
run: tar -czf /tmp/clnapp.tar.gz apps/frontend/build apps/backend/dist package.json package-lock.json
- uses: actions/upload-artifact@v3
with:
name: clnapp-build$VERSION
path: /tmp/clnapp.tar.gz
build:
name: Build image
runs-on: ubuntu-22.04
steps:
- name: Set env variables
run: |
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "IMAGE_NAME=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout project
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Get version from package.json
id: package-version
run: |
echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
echo "Image Name: $IMAGE_NAME"
echo "Branch Name: $BRANCH"
echo "Project Version: $VERSION"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
id: qemu
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
id: buildx
- name: Run Docker buildx
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag ghcr.io/$IMAGE_NAME:$VERSION \
--output "type=registry" .