name: Publish plugin-sdk to npm # Publishes trek-plugin-sdk when a tag like `plugin-sdk-v1.2.0` is pushed. # One-time setup: add an npm automation token as the repo secret NPM_TOKEN. # The package's prepublishOnly hook builds + tests before publishing. on: push: tags: - 'plugin-sdk-v*' permissions: contents: read jobs: publish: if: github.repository == 'liketrek/TREK' runs-on: ubuntu-24.04 timeout-minutes: 45 defaults: run: working-directory: plugin-sdk steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: # The Node the TREK image runs the plugins on. It has the node:sqlite # the dev-server tests exercise. node-version-file: .nvmrc registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}