Skip to content

fix: correct language filter, regex handling, and data persistence ed… #127

fix: correct language filter, regex handling, and data persistence ed…

fix: correct language filter, regex handling, and data persistence ed… #127

Workflow file for this run

name: Build Project
permissions:
contents: read
on:
push:
branches:
- dev
- main
paths-ignore:
- LICENSE.txt
- README.md
- README_CN.md
- docs/**
pull_request:
branches:
- dev
- main
paths-ignore:
- LICENSE.txt
- README.md
- README_CN.md
- docs/**
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
permissions:
contents: read
id-token: write
attestations: write
steps:
- uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check
run: pnpm check
- name: Build Windows bundle
if: runner.os == 'Windows'
run: pnpm exec tauri build --ci --bundles msi
- name: Build bundle
if: runner.os != 'Windows'
run: pnpm build
- name: Collect release artifacts
id: artifacts
shell: bash
run: |
files=()
while IFS= read -r -d '' file; do
files+=("$file")
done < <(
find src-tauri/target/release/bundle -type f \
\( -name '*.AppImage' \
-o -name '*.deb' \
-o -name '*.rpm' \
-o -name '*.dmg' \
-o -name '*.app.tar.gz' \
-o -name '*.msi' \) \
-print0
)
if [ "${#files[@]}" -eq 0 ]; then
echo "No release artifacts found."
find src-tauri/target/release/bundle -type f || true
exit 1
fi
{
echo 'paths<<EOF'
printf '%s\n' "${files[@]}"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Generate artifact attestation
# Fork PRs cannot mint OIDC tokens / write attestations with the default token.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: actions/attest@v4
with:
subject-path: ${{ steps.artifacts.outputs.paths }}
- name: Upload bundles
uses: actions/upload-artifact@v7
with:
name: codenest-${{ runner.os }}-${{ github.sha }}
path: src-tauri/target/release/bundle/**/*
if-no-files-found: error