Skip to content

feat: add create database modal #2

feat: add create database modal

feat: add create database modal #2

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
packages: read
actions: read
env:
NODE_VERSION: 20
PNPM_VERSION: 10.0.0
CI: true
FORCE_COLOR: 1
jobs:
preflight:
name: Preflight Validation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Print context
run: |
echo "Ref: $GITHUB_REF"
echo "Tag: ${{ github.ref_name }}"
echo "Actor: $GITHUB_ACTOR"
echo "SHA: $GITHUB_SHA"
- name: Validate tag format
run: |
if [[ ! "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid tag format"
exit 1
fi
- name: Ensure clean git tree
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Working tree is dirty"
exit 1
fi
- name: Extract version from package.json
run: |
VERSION=$(jq -r .version package.json)
TAG="${{ github.ref_name }}"
TAG_VERSION="${TAG#v}"
if [[ "$VERSION" != "$TAG_VERSION" ]]; then
echo "package.json version ($VERSION) != tag ($TAG_VERSION)"
exit 1
fi
quality-gate:
name: Quality Gate
runs-on: ubuntu-latest
needs: preflight
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install deps
run: pnpm install --frozen-lockfile --prefer-offline
build-windows:
name: Build Windows & Create Release
runs-on: windows-latest
needs: quality-gate
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: pnpm store cache
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: windows-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build Windows
run: pnpm run build:windows
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
files: |
apps/desktop/build/Datary-Setup-*.exe
apps/desktop/build/Datary-*.exe
apps/desktop/build/Datary-*.msi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-mac:
name: MacOS Build
runs-on: macos-latest
needs: build-windows
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build macOS
run: pnpm run build:mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
overwrite_files: true
files: |
apps/desktop/build/Datary-*.dmg
apps/desktop/build/Datary-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-linux:
name: Linux Build
runs-on: ubuntu-latest
needs: build-windows
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build Linux
run: pnpm run build:linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
overwrite_files: true
files: |
apps/desktop/build/Datary-*.AppImage
apps/desktop/build/Datary-*.deb
apps/desktop/build/Datary-*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}