Skip to content

Commit b8b2cee

Browse files
committed
Add a GitHub workflow to publish the viewer on NPM.
1 parent 3f79a93 commit b8b2cee

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish the Flatmap Viewer as a npm package
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
id-token: write # Required for OIDC
7+
contents: read
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Set the timezone to New Zealand
15+
uses: szenius/set-timezone@v2.0
16+
with:
17+
timezoneLinux: 'Pacific/Auckland'
18+
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 1
23+
submodules: recursive
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 'lts/*'
29+
registry-url: 'https://registry.npmjs.org'
30+
31+
- name: Update npm
32+
# Install the latest version of npm since we need npm 11.5.1 or later to publish to npm using OIDC (see
33+
# https://docs.npmjs.com/trusted-publishers).
34+
run: npm install -g npm@latest
35+
36+
- name: Install bun
37+
run: npm install -g bun
38+
39+
- name: Build the Flatmap Viewer
40+
run: bun install
41+
42+
- name: Publish the Flatmap Viewer on npm
43+
run: npm publish --access public --no-git-checks

0 commit comments

Comments
 (0)