Skip to content

Commit

Permalink
Start publishing with v1.0.0. Adding github CI and publishing actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
smallsaucepan committed Nov 4, 2024
1 parent aa3dff1 commit 1c53482
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 28 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI build

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Using Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- run: git diff --exit-code
- run: npm install --frozen-lockfile
- run: npm test
32 changes: 32 additions & 0 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: NPM publish
on:
release:
types: [published]

jobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm ci

- run: npm run build

- run: npm test

- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This is Version 2.0.0 of marching-squares-ts
This is Version 1.0.0 of marching-squares-ts
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "marching-squares-ts",
"description": "A TypeScript implementation of the marching squares algorithm featuring isoline and isoband computation.",
"version": "2.0.0",
"version": "1.0.0",
"author": {
"name": "James Beard",
"email": "[email protected]",
Expand All @@ -26,25 +26,25 @@
"main": "./dist/cjs/index.cjs",
"types": "./dist/cjs/index.d.cts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"default": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts"
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"default": {
"default": "./dist/cjs/index.cjs",
"types": "./dist/cjs/index.d.cts"
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
}
},
"directories": {
"example": "./example",
"dist": "./dist"
},
"files": [
"agpl-3.0.txt",
"dist"
],
"scripts": {
"build": "rollup -c",
"pretest": "rollup -c rollup.config.test.js",
"test": "node ./test/test.js"
"build": "npx tsup && npx rollup -c",
"test": "npx tsx ./test/test.ts"
},
"homepage": "https://github.com/smallsaucepan/marching-squares-ts",
"repository": {
Expand Down
14 changes: 0 additions & 14 deletions rollup.config.test.js

This file was deleted.

0 comments on commit 1c53482

Please sign in to comment.