diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..7d45044 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -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 diff --git a/README.md b/README.md index c5aa9e8..02bd045 100644 --- a/README.md +++ b/README.md @@ -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! diff --git a/package.json b/package.json index aadeb18..c6484d7 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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",