diff --git a/.github/workflows/release-on-npm.yml b/.github/workflows/release-on-npm.yml new file mode 100644 index 00000000..14e42414 --- /dev/null +++ b/.github/workflows/release-on-npm.yml @@ -0,0 +1,32 @@ +name: Publish package to npm +on: + release: + types: [published] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Publish + run: pnpm publish --filter ./packages/tuono + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/packages/tuono-vite/package.json b/packages/tuono-vite/package.json index 15f22622..759a8a64 100644 --- a/packages/tuono-vite/package.json +++ b/packages/tuono-vite/package.json @@ -44,7 +44,7 @@ "@babel/types": "^7.24.0", "@types/babel__core": "^7.20.5", "@types/node": "^20.12.7", - "router-generator": "workspace:*" + "tuono-routes-generator": "workspace:*" }, "devDependencies": { "@types/babel-traverse": "^6.25.10"