Merge pull request #1 from p10ns11y/prepare-multi-pack #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on Version Change | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'package.json' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npx trubo run build | |
- name: Publish to GitHub Packages | |
working-directory: packages/core | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npm publish --registry=https://npm.pkg.github.com/ | |
- name: Publish to npm | |
working-directory: packages/core | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm publish --registry=https://registry.npmjs.org/ --access public |