Workflow file for this run
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 NPM Package | |
on: | |
release: | |
types: [published] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
registry-url: https://registry.npmjs.org/ | |
cache: 'pnpm' | |
- name: Install deps | |
run: pnpm install | |
- run: pnpm test:panel | |
publish-npm: | |
needs: test | |
runs-on: ubuntu-latest | |
concurrency: "run" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
registry-url: https://registry.npmjs.org/ | |
cache: 'pnpm' | |
- name: Install deps | |
run: pnpm install | |
- name: Setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Build App | |
run: | | |
pnpm build:panel | |
- name: Publish to npm | |
run: | | |
cd packages/trpc-ui | |
echo "publishing with version ${{ github.event.release.tag_name }}" | |
npm publish --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |