43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
# This workflow will publish the @umbraco-cms/backoffice package to npmjs.com
|
|
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
# The @umbraco-cms scope is owned by Umbraco HQ
|
|
|
|
name: Node.js Package
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=16384
|
|
|
|
jobs:
|
|
build_publish:
|
|
name: Build and publish
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: npm-publish
|
|
cancel-in-progress: true
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'npm'
|
|
registry-url: https://registry.npmjs.org/
|
|
scope: '@umbraco-cms'
|
|
- run: npm ci
|
|
- run: npm run build:for:npm
|
|
- run: npm run generate:jsonschema
|
|
- run: npm run wc-analyze
|
|
- run: npm run wc-analyze:vscode
|
|
- name: Version and publish
|
|
run: |
|
|
SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-8)
|
|
npm whoami
|
|
npm version 1.0.0-next.$SHA_SHORT --allow-same-version --no-git-tag-version
|
|
npm publish --tag next --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|