Skip to content

Commit

Permalink
Merge pull request #300 from equinor/sefo/feat/add-npm-publish-wf
Browse files Browse the repository at this point in the history
ci: rewrite npm publish workflow
  • Loading branch information
sefornes authored Jan 30, 2025
2 parents e9c4c51 + d96c91d commit bce338a
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Node CI
on:
push:
branches: [dev]
pull_request:
branches: [dev]
types: closed

jobs:
build:
Expand All @@ -29,17 +26,7 @@ jobs:
npm run lint
env:
CI: true
- name: Compare versions
id: compare
shell: bash
run: |
PKG_VERSION="$(npm search videx-wellog -json true | jq .[].version -r)"
echo "Online version: $PKG_VERSION"
LOCAL_VERSION="$(cat package.json | jq .version -r)"
if ! printf "$LOCAL_VERSION\n$PKG_VERSION" | sort -V -C; then BUMP='true'; else BUMP='false'; fi;
echo $BUMP >> $GITHUB_OUTPUT
- name: Publish
if: ${{steps.compare.outputs.BUMP == 'true'}} && github.event.pull_request.merged = true
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
Expand Down

0 comments on commit bce338a

Please sign in to comment.