Merge pull request #2 from p10ns11y/package/spilt-utils #15
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' | |
- 'packages/**/package.json' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
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://npm.pkg.github.com/' | |
registry-url: 'https://registry.npmjs.org/' | |
# scope: '@adaptate' | |
# - name: Configure .npmrc for GitHub Packages | |
# run: | | |
# echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc | |
# echo "@adaptate:registry=https://npm.pkg.github.com" >> ~/.npmrc | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npx turbo run build | |
# pnpm will publish all packages in the monorepo | |
# --provenance for comprehensive metadata about their build process, enhancing their security and traceability | |
- name: Publish adaptate to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_USER_TOKEN }} | |
run: pnpm publish --recursive --provenance --access public | |
# - name: Publish @adaptate/core to npm | |
# working-directory: packages/core | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: npm publish --provenance --access public | |
# - name: Publish @adaptate/core to GitHub Packages | |
# working-directory: packages/core | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# run: npm publish --registry=https://npm.pkg.github.com/ |