46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Publish NPM Package
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://git.quad4.io/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
|
|
- name: Setup Node.js
|
|
uses: https://git.quad4.io/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
with:
|
|
node-version: '22'
|
|
cache: pnpm
|
|
|
|
- name: Setup Task
|
|
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
|
with:
|
|
version: '3.46.3'
|
|
|
|
- name: Setup environment
|
|
run: task setup
|
|
|
|
- name: Install dependencies
|
|
run: task install:ci
|
|
|
|
- name: Package
|
|
run: task package
|
|
|
|
- name: Configure npm for publishing
|
|
uses: https://git.quad4.io/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
|
with:
|
|
node-version: '22'
|
|
registry-url: 'https://git.quad4.io/api/packages/quad4-software/npm/'
|
|
|
|
- name: Publish
|
|
run: task publish
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|