Skip to content

Commit

Permalink
fix ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKhanj committed Sep 23, 2023
1 parent 3415c06 commit e60d927
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,23 @@ jobs:
- name: Get package.json version
id: get-version
run: |
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Get latest npm version
id: get-npm-version
run: |
echo "latest=$(npm show convconv version)" >> $GITHUB_OUTPUT
echo "LATEST=$(npm show convconv version)" >> $GITHUB_OUTPUT
- name: Compare versions
id: compare-versions
run: |
echo "should-publish=$([[ $VERSION > $LATEST ]] && echo -n 'true' || echo -n 'false')" >> $GITHUB_OUTPUT
echo "$LATEST"
echo "$VERSION"
echo "should_publish=$([[ $VERSION > $LATEST ]] && echo -n 'true' || echo -n 'false')"
echo "should_publish=$([[ $VERSION > $LATEST ]] && echo -n 'true' || echo -n 'false')" >> $GITHUB_OUTPUT
- name: Publish to npm
if: steps.compare-versions.outputs.should-publish == 'true'
if: steps.compare-versions.outputs.should_publish == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
Expand Down

0 comments on commit e60d927

Please sign in to comment.