Publish sdk-dapp-ui #65
Workflow file for this run
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: Publish sdk-dapp-ui | |
| on: | |
| push: | |
| branches: [main] | |
| repository_dispatch: | |
| types: publish-npm | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish-npm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| clean: true | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Setup pnpm | |
| run: npm install -g pnpm | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Install Chrome for Puppeteer | |
| run: | | |
| wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install -y google-chrome-stable | |
| - name: Run unit tests | |
| run: pnpm run test | |
| env: | |
| PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome- | |
| - name: Clear dist | |
| run: rm -rf dist | |
| - name: Build | |
| run: pnpm run build | |
| - name: Get package info | |
| id: package | |
| uses: andreigiura/action-nodejs-package-info@v1.0.2 | |
| - name: Pack for inspection | |
| run: npm pack | |
| - name: List tarball contents | |
| run: tar -tzf *.tgz | |
| # - name: Publish to npmjs next version | |
| # env: | |
| # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| # if: ${{ steps.package.outputs.is-prerelease == 'true'}} | |
| # run: echo ${{ steps.package.outputs.is-prerelease}} && npm publish --tag next --no-git-checks | |
| # - name: Publish to npmjs | |
| # env: | |
| # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| # if: ${{ steps.package.outputs.is-prerelease == 'false' }} | |
| # run: npm publish --no-git-checks |