Merge pull request #51 from ClayPulse/add-remote-editor-env #22
This file contains hidden or 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
| # This workflow will run tests using node and then publish a package to GitHub Packages | |
| name: Release NPM Package | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "npm-packages/shared-utils/**" | |
| - "npm-packages/react-api/**" | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm i --workspace=npm-packages/shared-utils && npm i --workspace=npm-packages/react-api | |
| - name: Build @pulse-editor/shared-utils | |
| run: npm run build --workspace=npm-packages/shared-utils | |
| - name: Build @pulse-editor/react-api | |
| run: npm run build --workspace=npm-packages/react-api | |
| - name: Install changesets | |
| run: npm i -D changesets | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: npx changeset version | |
| # This expects you to have a script called release which does a build for your packages and calls changeset publish | |
| publish: npx changeset publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} |