Files
waveform-analysis/.gitea/workflows/package.yml
Gitea CI Administrator 3b6f85536f
All checks were successful
Package component / package (push) Successful in 3m54s
ci: remove external action dependencies
2026-07-20 06:18:11 +00:00

71 lines
1.9 KiB
YAML

name: Package component
on:
push:
branches:
- main
jobs:
package:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out repository
shell: bash
run: |
set -euo pipefail
server_url="${{ gitea.server_url }}"
repository_url="${server_url%/}/${{ gitea.repository }}.git"
git init .
git remote add origin "$repository_url"
git fetch --depth 1 origin "${{ gitea.sha }}"
git checkout --detach FETCH_HEAD
- name: Set up pnpm
run: |
corepack enable
corepack prepare pnpm@10.32.1 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Type check
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Test with coverage
run: pnpm test:coverage
- name: Build component
run: pnpm build
- name: Pack component
run: pnpm pack --pack-destination artifacts
- name: Verify component package
shell: bash
run: |
set -euo pipefail
package_file="$(find artifacts -maxdepth 1 -type f -name '*.tgz' -print -quit)"
test -n "$package_file"
package_contents="$(tar -tzf "$package_file")"
for required_file in \
package/dist/index.js \
package/dist/index.cjs \
package/dist/types/index.d.ts \
package/dist/style.css \
package/package.json \
package/README.md; do
grep -Fxq "$required_file" <<< "$package_contents"
done
- name: Upload component package
uses: https://lqycustomsite.online/admin/actions-upload-artifact@v3
with:
name: waveform-analysis-${{ gitea.sha }}
path: artifacts/*.tgz
if-no-files-found: error
retention-days: 7