idraw/.github/workflows/release.yml
2026-03-28 21:29:55 +08:00

42 lines
1.5 KiB
YAML

name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'idrawjs/idraw'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v5
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v5
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install --global pnpm@10
- run: pnpm i
- run: npm run test
- run: npm run build
- run: npm run version:reset-for-release
- run: npm publish --provenance --access public -w ./packages/types --tag next
# - run: npm publish --provenance --access public -w ./packages/types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/util --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/renderer --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/core --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/idraw --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: npm publish --provenance --access public -w ./packages/figma
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}