diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..90c13b7 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,36 @@ +name: Publish npm package + +on: + workflow_dispatch: + push: + tags: + - "v*" + +permissions: + contents: read + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + working-directory: frontend + run: npm install + + - name: Build package + working-directory: frontend + run: npm run build + + - name: Publish to npm + working-directory: frontend + run: npm publish --access public --provenance \ No newline at end of file