37 lines
753 B
YAML
37 lines
753 B
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
registry-url: https://git.metona.cn/api/packages/MetonaTeam/npm/
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
|
|
- name: Run tests
|
|
run: npx jest --forceExit --maxWorkers=2 --no-cache --coverage
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Publish to Gitea npm registry
|
|
run: npm publish --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
|