Skip to content

Commit

Permalink
Publish to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed May 4, 2024
1 parent 71fac0f commit 4c4d35a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish to NPM

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
- uses: pnpm/action-setup@v3
- run: pnpm install && pnpm run prepublishOnly
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: true
access: public
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,5 @@ And at the same time, this has actually been a pretty superficial tour: we haven
(Also, at some point you'll be able to use the "Calibre Connect" Obsidian plugin I'm working on as an example of how to use these things to create responsive search and tame Electron WebFrames while keeping track of whether a connection to a remote server is available, handling logins and background processes and integrating a plugin to a larger application, not to mention controlling lots of features via settings.)
In the meantime, this library should shortly be available via npm. Enjoy!
In the meantime, this library should now be available via npm. Enjoy!
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "uneventful",
"version": "0.0.1",
"type": "module",
"main": "./dist/mod.cjs",
"module": "./dist/mod.mjs",
"types": "./dist/mod.d.ts",
"files": ["./dist/*"],
"exports": {
"require": {
"types": "./dist/mod.d.ts",
Expand All @@ -21,7 +23,7 @@
"watch": "mocha -r tsx --watch",
"watch-docs": "onchange -i --kill \"*.md\" \"guides/**/*.md\" \"typedoc.config.*\" \"typedoc/*\" -- tsx typedoc/run.mts --watch",
"test": "mocha -r tsx && pkgroll",
"prepublishOnly": "mocha -r tsx && pkgroll"
"prepublishOnly": "mocha -r tsx && pkgroll --minify --sourcemap"
},
"mocha": {
"spec": "specs/*.spec.ts",
Expand Down

0 comments on commit 4c4d35a

Please sign in to comment.