upgrade dependencies #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Electron App and Docker Image | |
on: | |
push: | |
tags: | |
- "*" # Triggers on any tag | |
jobs: | |
build_and_release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
name: "macOS Build" | |
- os: ubuntu-latest | |
name: "Ubuntu Build" | |
- os: windows-latest | |
name: "Windows Build" | |
- os: ubuntu-latest | |
name: "Docker Build" | |
platform: linux/amd64,linux/arm64,linux/arm/v7 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Extract Major.Minor tag (only for Docker job) | |
if: matrix.name == 'Docker Build' | |
uses: damienaicheh/[email protected] | |
- name: Install Node.js, NPM, and Yarn | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Build client (only for non-Docker jobs) | |
if: matrix.name != 'Docker Build' | |
run: | | |
cd client | |
yarn --network-timeout 100000 | |
yarn build | |
cp -r build ../server | |
- name: Build and Release Electron App | |
if: matrix.name != 'Docker Build' | |
uses: samuelmeuli/action-electron-builder@v1 | |
with: | |
package_root: "./server" | |
build_script_name: "build-electron" | |
github_token: ${{ secrets.GH_TOKEN }} | |
release: ${{ startsWith(github.ref, 'refs/tags/') }} | |
- name: Set up Docker Buildx (only for Docker job) | |
if: matrix.name == 'Docker Build' | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub (only for Docker job) | |
if: matrix.name == 'Docker Build' | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PWD }} | |
- name: Build and Push Docker Image | |
if: matrix.name == 'Docker Build' | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: ${{ matrix.platform }} | |
tags: | | |
zilliz/attu:${{ github.ref_name }} | |
zilliz/attu:v${{ env.MAJOR }}.${{ env.MINOR }} | |
cache-from: type=registry,ref=zilliz/attu:cache | |
cache-to: type=inline | |
build-args: | | |
VERSION=${{ github.ref_name }} | |
push: true |