Connect adaptate and @adaptate/core #12
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 | |
- name: Publish adaptate to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm publish --access public | |
- name: Publish @adaptate/core to npm | |
working-directory: packages/core | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm publish --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/ |