b8afb29ebe
Replaced monolithic publish workflow with cleaner 3-workflow pattern from headlamp-polaris-plugin: Changes: - ci.yaml: Basic lint/test on push/PR (simplified) - prepare-release.yaml: NEW - Manual workflow to bump version and tag - release.yaml: NEW - Two-job pattern (build → update-metadata) Key improvements: - Uses npx @kinvolk/headlamp-plugin package (standard CLI) - Separates version bumping from release building - Two-job release: build artifacts, then update main with checksum - Better validation (tarball name, contents) - Cleaner git history (metadata updates are separate commits) - Matches polaris-plugin proven pattern Breaking changes: - No longer uses publish.yml - Release process now requires prepare-release workflow first - Checksums updated via separate job after release completes Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: local-ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: headlamp-sealed-secrets/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: ./headlamp-sealed-secrets
|
|
run: npm ci
|
|
|
|
- name: Type-check
|
|
working-directory: ./headlamp-sealed-secrets
|
|
run: npm run tsc
|
|
|
|
- name: Lint
|
|
working-directory: ./headlamp-sealed-secrets
|
|
run: npm run lint
|
|
|
|
- name: Build plugin
|
|
working-directory: ./headlamp-sealed-secrets
|
|
run: npx @kinvolk/headlamp-plugin build
|
|
|
|
- name: Verify build artifacts
|
|
working-directory: ./headlamp-sealed-secrets
|
|
run: |
|
|
if [ ! -d "dist" ] || [ -z "$(ls -A dist)" ]; then
|
|
echo "::error::dist directory is empty or missing"
|
|
exit 1
|
|
fi
|
|
echo "✓ Build artifacts verified"
|
|
ls -lh dist/
|
|
|
|
- name: Upload build artifact (for inspection)
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: plugin-dist
|
|
path: headlamp-sealed-secrets/dist/
|
|
retention-days: 7
|