setup-node with cache: npm requires a lock file; the initial run failed with 'Dependencies lock file is not found'. Committing the generated package-lock.json and updating checkout/setup-node to the latest v7 major (node24 runtime; requires act_runner >= 0.2.13).
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
|
|
- name: Install npm deps
|
|
run: npm ci
|
|
|
|
- name: Install OPA
|
|
run: ./scripts/install-opa.sh
|
|
|
|
- name: Check, lint and test
|
|
run: ./scripts/check.sh
|
|
|
|
- name: Build bundles
|
|
run: ./scripts/build.sh
|
|
|
|
publish:
|
|
if: github.ref == 'refs/heads/main'
|
|
needs: verify
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
|
|
- name: Install npm deps
|
|
run: npm ci
|
|
|
|
- name: Install OPA
|
|
run: ./scripts/install-opa.sh
|
|
|
|
- name: Build bundles
|
|
run: ./scripts/build.sh
|
|
|
|
- name: Publish bundles to Gitea package registry
|
|
env:
|
|
GITEA_URL: https://gitea.devegamoreno.com
|
|
GITEA_OWNER: jdevega
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: ./scripts/publish.sh |