diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml new file mode 100644 index 0000000..288c63d --- /dev/null +++ b/.github/workflows/publish-cli.yml @@ -0,0 +1,30 @@ +name: Publish CLI to npm + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + publish: + name: npm publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + working-directory: cli + + - name: Publish + run: npm publish --access public + working-directory: cli + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}