Some checks failed
CI / build-and-publish (push) Failing after 0s
node:apline doesn't include bash it only has sh so i set the default shell to that
45 lines
980 B
YAML
45 lines
980 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: node-latest
|
|
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: npm ci --prefer-offline
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Check formatting
|
|
run: npm run format:check
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
- name: Build CDN assets and npm package
|
|
run: |
|
|
npm run build
|
|
npm run build:raw
|
|
|
|
- name: Publish to Gitea npm registry
|
|
if: success()
|
|
env:
|
|
GITEA_HOST: ${{ secrets.GITEA_HOST }}
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: |
|
|
set -e
|
|
OWNER="${{ github.repository_owner }}"
|
|
echo "//${GITEA_HOST}/api/packages/${OWNER}/npm/:_authToken=${GITEA_TOKEN}" > .npmrc
|
|
npm publish \
|
|
--registry "https://${GITEA_HOST}/api/packages/${OWNER}/npm" \
|
|
--ignore-scripts
|