v0.0.15 #248
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: Build and Publish Monorepo | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build Project | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
- name: Install pnpm | |
run: | | |
npm install -g pnpm | |
- name: Install Dependencies | |
run: | | |
pnpm install | |
# Build all packages (React, SvelteKit, Vue) | |
- name: Build All Packages | |
run: | | |
pnpm -r run build | |
publish: | |
name: Publish Repositories | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
- name: Install pnpm | |
run: | | |
npm install -g pnpm | |
- name: Install Dependencies | |
run: | | |
pnpm install | |
- name: Set up NPM auth token | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
# Publish the Monorepo (root package) | |
- name: Publish Monorepo Root Package | |
run: | | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Publish React Package | |
- name: Publish React Package | |
run: | | |
cd libs/react | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Publish Svelte Package | |
- name: Publish Svelte Package | |
run: | | |
cd libs/svelte | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Publish Vue Package | |
- name: Publish Vue Package | |
run: | | |
cd libs/vue | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |