From 3e435d76175ee94efaa935be38766c04a15de1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristram=20Gr=C3=A4bener?= Date: Mon, 7 Oct 2024 17:59:32 +0200 Subject: [PATCH] wasm: publish releases on npm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tristram Gräbener --- .github/workflows/publish_npm.yaml | 22 ++++++++++++++++++++++ wasm/package.json | 6 ++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/publish_npm.yaml diff --git a/.github/workflows/publish_npm.yaml b/.github/workflows/publish_npm.yaml new file mode 100644 index 0000000..1a65a8f --- /dev/null +++ b/.github/workflows/publish_npm.yaml @@ -0,0 +1,22 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + scope: '@osrd-project' + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/wasm/package.json b/wasm/package.json index 0037e68..28f7c61 100644 --- a/wasm/package.json +++ b/wasm/package.json @@ -19,5 +19,11 @@ "alpinejs": "^3.14.0", "maplibre-gl": "^4.3.0", "pmtiles": "^3.0.5" + }, + "name": "liblrs", + "version": "0.1.0", + "repository": { + "type": "git", + "url": "https://github.com/osrd-project/liblrs/" } }