Skip to content

Commit 740a5ac

Browse files
committed
npm publish --dry-run: need dev version and tag
1 parent 23ac278 commit 740a5ac

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,26 @@ jobs:
141141
- uses: actions/setup-node@v5
142142
with:
143143
node-version: '24.x'
144-
registry-url: https://registry.npmjs.org
144+
registry-url: https://registry.npmjs.org
145+
146+
- name: Should this be set as latest
147+
run: |
148+
if [[ ${{ github.ref }} =~ ^refs/tags/v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
149+
NPM_TAG=latest
150+
else
151+
NPM_TAG=dev
152+
fi
153+
echo "NPM_TAG=$NPM_TAG" >> "$GITHUB_ENV"
145154
146155
- name: Download artifacts from build
147156
uses: actions/download-artifact@v5
148157
with:
149158
name: jsdist
150159
path: jsdist
151-
- run: npm publish --dry-run ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
152-
- run: npm publish ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
160+
161+
- run: npm publish --tag "$NPM_TAG" --dry-run ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
162+
163+
- run: npm publish --tag "$NPM_TAG" ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
153164
if: startsWith(github.ref, 'refs/tags')
154165
env:
155166
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyter-offlinenotebook",
3-
"version": "0.3.2",
3+
"version": "0.3.3-dev",
44
"description": "JupyterLab offline-notebook extension.",
55
"keywords": [
66
"jupyter",

0 commit comments

Comments
 (0)