Skip to content

fix: stop cosmetic dedupe feedback loop #1

fix: stop cosmetic dedupe feedback loop

fix: stop cosmetic dedupe feedback loop #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-and-test:
strategy:
matrix:
node-version: [20, 22]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup npm cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm install
# - name: Run linter
# run: npm run lint
- name: Build application
run: npm run build
env:
MAIN_VITE_OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_ENDPOINT }}
MAIN_VITE_OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_HEADERS }}
MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
MAIN_VITE_OTEL_DEPLOYMENT_ENV: ci
test-builds:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup npm cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: npm install
- name: Build application
run: npm run build
env:
MAIN_VITE_OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_ENDPOINT }}
MAIN_VITE_OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_HEADERS }}
MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT }}
MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_HEADERS: ${{ secrets.MAIN_VITE_OTEL_EXPORTER_OTLP_TRACES_HEADERS }}
MAIN_VITE_OTEL_DEPLOYMENT_ENV: ci
- name: Clean dist before packaging
shell: bash
run: rm -rf dist
- name: Build Electron app (Ubuntu)
if: matrix.os == 'ubuntu-latest'
shell: bash
env:
USE_HARD_LINKS: false
run: npx --no-install electron-builder --linux=AppImage --publish never
- name: Build Electron app (Windows)
if: matrix.os == 'windows-latest'
shell: bash
env:
USE_HARD_LINKS: false
DEBUG: electron-builder
ELECTRON_BUILDER_DEBUG: true
run: npx --no-install electron-builder --win --publish never
- name: Build Electron app (macOS)
if: matrix.os == 'macos-latest'
shell: bash
env:
USE_HARD_LINKS: false
run: npx --no-install electron-builder --mac=dmg --publish never
- name: Upload artifacts (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: latest-windows
path: |
dist/*.exe
dist/*.exe.blockmap
retention-days: 7
- name: Upload artifacts (macOS)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: latest-macos
path: |
dist/*.dmg
dist/*.dmg.blockmap
dist/*.zip
dist/*.zip.blockmap
retention-days: 7
- name: Upload artifacts (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: latest-linux
path: dist/*.AppImage
retention-days: 7