Publish the Flatmap Viewer as a npm package #2
Workflow file for this run
This file contains hidden or 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: Publish the Flatmap Viewer as a npm package | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set the timezone to New Zealand | |
| uses: szenius/set-timezone@v2.0 | |
| with: | |
| timezoneLinux: 'Pacific/Auckland' | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| submodules: recursive | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Update npm | |
| # Install the latest version of npm since we need npm 11.5.1 or later to publish to npm using OIDC (see | |
| # https://docs.npmjs.com/trusted-publishers). | |
| run: npm install -g npm@latest | |
| - name: Install bun | |
| run: npm install -g bun | |
| - name: Build the Flatmap Viewer | |
| run: bun install | |
| - name: Publish the Flatmap Viewer on npm | |
| run: npm publish --access public --no-git-checks |