Skip to content

Commit

Permalink
Merge pull request #54 from hildjj/versioning
Browse files Browse the repository at this point in the history
Versioning
  • Loading branch information
hildjj authored Sep 5, 2024
2 parents 2301a3c + 31c863a commit b63684d
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: npm run all:link
- run: pnpm i -r
- run: npm run lint
- run: npm run test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: npm run all:link
- run: pnpm i -r
- run: npm run all:check
- name: Deploy Docs
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm all:link
- run: pnpm i -r
- run: npm run all:check
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
publish_branch: gh-pages
destination_dir: docs
- run: npm pkg delete devDependencies -ws
- run: npm publish --access public --provenance -ws
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 0 additions & 6 deletions lerna.json

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"all:docs": "pnpm run -r docs",
"all:types": "pnpm run -r types",
"all:install": "pnpm i -r",
"clean": "rm -rf node_modules coverage pkg/*/node_modules pkg/*/coverage"
"all:link": "pnpm run -r link",
"clean": "rm -rf node_modules coverage pkg/*/node_modules pkg/*/coverage",
"version": "ver=`npm pkg get version | sed -E 's/\"*([^\"]+)\"*/\\1/'` && npm pkg set -ws version=$ver && npm pkg set dependencies.dohdec=$ver --workspace dohdec-cli && git add pkg/*/package.json"
},
"keywords": [
"doh",
Expand Down
5 changes: 3 additions & 2 deletions pkg/dohdec-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint . --ext js",
"test": "ava",
"types": "tsc",
"check": "npm pack --dry-run"
"check": "npm pack --dry-run",
"link": "pnpm link ../dohdec"
},
"keywords": [
"doh",
Expand All @@ -32,7 +33,7 @@
},
"dependencies": {
"commander": "^12.1.0",
"dohdec": "link:../dohdec"
"dohdec": "5.0.3"
},
"devDependencies": {
"@types/node": "^22.5.4",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

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

0 comments on commit b63684d

Please sign in to comment.