Merge pull request #1720 from skip-mev/changeset-release/main #132
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
| name: Release Web Component | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| # Optional: Run only if Changesets released (can check for specific commit message prefix) | |
| if: contains(github.event.head_commit.message, 'Version Packages') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'yarn' | |
| cache-dependency-path: yarn.lock | |
| - name: Install dependencies | |
| run: YARN_ENABLE_SCRIPTS=false yarn install --immutable | |
| - name: Build | |
| run: yarn build | |
| - name: Configure .npmrc for authentication | |
| run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Publish widget web component | |
| working-directory: packages/widget | |
| run: yarn publish:web-component | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |