Skip to content

dragdoll v0.12.0

dragdoll v0.12.0 #12

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
if: ${{ startsWith(github.event.release.tag_name, 'dragdoll@') || startsWith(github.event.release.tag_name, 'dragdoll-react@') }}
runs-on: ubuntu-latest
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- name: Select workspace
run: |
if [[ "$RELEASE_TAG" == dragdoll@* ]]; then
echo "TARGET_WORKSPACE=dragdoll" >> "$GITHUB_ENV"
elif [[ "$RELEASE_TAG" == dragdoll-react@* ]]; then
echo "TARGET_WORKSPACE=dragdoll-react" >> "$GITHUB_ENV"
else
echo "Release tag must start with dragdoll@ or dragdoll-react@" >&2
exit 1
fi
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish
run: npm publish --workspace=${{ env.TARGET_WORKSPACE }}