mirror of
https://github.com/pdfme/pdfme.git
synced 2026-05-19 04:11:18 -04:00
45 lines
970 B
YAML
45 lines
970 B
YAML
# .github/workflows/publish-release.yml
|
|
name: Publish Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '[0-9]+.[0-9]+.[0-9]+*'
|
|
|
|
jobs:
|
|
publish-npm:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Set NPM version
|
|
run: |
|
|
VERSION=${GITHUB_REF#refs/tags/}
|
|
npm version $VERSION --no-git-tag-version --workspaces
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Test
|
|
run: npm run test
|
|
env:
|
|
CI: true
|
|
|
|
- name: Determine NPM tag
|
|
run: ./scripts/determine-npm-tag.sh
|
|
|
|
- name: Publish to NPM
|
|
run: npm publish --workspaces --access public --tag ${{ env.NPM_TAG }}
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|