Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .github/workflows/npm-publish.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
name: Build and publish Docker image
name: Publish

on:
release:
types: [published]

jobs:
npm-publish:
environment:
name: npm-bmssp

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [24.x]

permissions:
contents: read
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install npm dependencies
run: npm ci

- name: Publish npm package
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

docker-build-and-publish:
needs: npm-publish

environment:
name: dockerhub

Expand All @@ -15,7 +50,7 @@ jobs:
contents: read

steps:
- name: Docker meta
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
Expand Down
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM node:24-alpine

WORKDIR /app
WORKDIR /bmssp-js

# Copy package files and install dependencies
COPY package*.json ./
RUN npm install
RUN npm install bmssp

# Mount src/ directory as a volume
VOLUME ["src/", "test/"]
COPY examples/main.js .

# Default command (can be overridden)
CMD ["node", "test/main.js"]
CMD ["node", "main.js"]
3 changes: 3 additions & 0 deletions examples/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { printMessage } from "bmssp";

printMessage("Hello, World!");
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "bmssp",
"version": "0.7.0",
"version": "0.8.0",
"description": "Javascript package implementation of the bmssp algorithm.",
"main": "src/bmssp.mjs",
"keywords": [
"shortest-paths",
"bmssp",
Expand Down