Files
speckle-server/.github/workflows/npm.yml
T
2025-06-12 11:23:35 +02:00

40 lines
1.2 KiB
YAML

on:
workflow_call:
inputs:
IMAGE_VERSION_TAG:
required: true
type: string
secrets:
NPM_TOKEN:
required: true
jobs:
publish:
name: Publish to npm
runs-on: blacksmith
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
IMAGE_VERSION_TAG: ${{ inputs.IMAGE_VERSION_TAG }}
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: useblacksmith/setup-node@v5
with:
node-version: 22
cache: yarn
- name: Install hardened (no HARD flag)
run: PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn --immutable
- name: Auth to npm as Speckle
run: |
echo "npmRegistryServer: https://registry.npmjs.org/" >> .yarnrc.yml
echo "npmAuthToken: $NPM_TOKEN" >> .yarnrc.yml
- name: Try login to npm
run: yarn npm whoami
- name: Build public packages
run: yarn workspaces foreach -ptvW --no-private run build
- name: Bump all versions
run: yarn workspaces foreach -tvW version $IMAGE_VERSION_TAG
- name: publish to npm
run: 'yarn workspaces foreach -pvW --no-private npm publish --access public'