Skip to content

Commit

Permalink
ci: add node auth token for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 10, 2024
1 parent 4e646ca commit 88d2f98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
~/.pnpm-store
D:\.pnpm-store
./.dub
~/llvm
key: "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-${{ hashFiles('./dub.selections.json', './pnpm-lock.yaml')}} }}"
restore-keys: |
"cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-"
Expand Down Expand Up @@ -71,7 +70,7 @@ jobs:
node-version: ${{ matrix.node }}

- name: Setup Pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm }}

Expand Down Expand Up @@ -114,6 +113,7 @@ jobs:
tar -czf ./dist/minijson-macos-x64.tar.gz -C ./dist/darwin-x64 minijson
tar -czf ./dist/minijson-macos-arm64.tar.gz -C ./dist/darwin-arm64 minijson
tar -czf ./dist/minijson-linux-x64.tar.gz -C ./dist/linux-x64 minijson
ls -l ./dist
- name: Draft the release
if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -130,4 +130,6 @@ jobs:
- name: Publish to npm
if: startsWith(github.ref, 'refs/tags/')
run: pnpm publish --access public
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@
"format": "prettier -l --cache --write . && pnpm run format.d",
"format.d": "dub run --build=release --quiet dfmt -- --soft_max_line_length 110 --indent_size 2 --inplace ./src ./benchmark",
"lint": "eslint . --fix",
"prepublishOnly": "shx rm -rf ./dist/tsconfig.tsbuildinfo ./dist/*.zip ./dist/build.* && chmod +x ./dist/*/minijson",
"prepublishOnly": "shx rm -rf ./dist/tsconfig.tsbuildinfo ./dist/*.zip ./dist/*.tar.* ./dist/build.* && chmod +x ./dist/*/minijson",
"start.benchmark.js": "node ./benchmark/js-benchmark.mjs",
"start.benchmark.node": "node ./benchmark/native-benchmark.mjs",
"start.browser": "servor ./dist/ --browse --reload",
"start.node": "node ./dist/node/cli.js",
"start.profile": "shx rm -rf ./trace.* && pnpm run start.benchmark.node && profdump.exe --dot trace.log trace.dot && dot -Tsvg trace.dot -o trace.svg && ./trace.svg",
"test": "pnpm run build.node && jasmine ./test/index-test.mjs",
"test.format": "prettier -l --cache . --check",
"test.lint": "eslint .",
"zip": "zip -9 -j ./dist/minijson-windows-x64.zip ./dist/win32-x64/minijson.exe && zip -9 -j ./dist/minijson-macos-x64.zip ./dist/darwin-x64/minijson && zip -9 -j ./dist/minijson-macos-arm64.zip ./dist/darwin-arm64/minijson && zip -9 -j ./dist/minijson-linux-x64.zip ./dist/linux-x64/minijson "
"test.lint": "eslint ."
},
"prettier": "prettier-config-atomic",
"dependencies": {
Expand Down

0 comments on commit 88d2f98

Please sign in to comment.