Skip to content

Commit

Permalink
Remove javy-cli from NPM publishing workflow (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcharles authored Aug 14, 2024
1 parent 92e5d82 commit 2627a5e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:

jobs:
publish_npm:
name: Publish ${{ matrix.package }} NPM package
name: Publish javy NPM package
runs-on: ubuntu-latest
strategy:
matrix:
package: [javy, javy-cli]
steps:
- uses: actions/checkout@v4

Expand All @@ -21,20 +18,19 @@ jobs:

- name: Install package dependencies
run: npm install
working-directory: npm/${{ matrix.package }}
working-directory: npm/javy

- name: Build NPM package
if: matrix.package == 'javy'
run: npm run build
working-directory: npm/${{ matrix.package }}
working-directory: npm/javy

- name: Publish NPM package if new version
run: |
if [[ $(cat package.json | jq -r .version) == $(npm view ${{ matrix.package }} version) ]]; then
if [[ $(cat package.json | jq -r .version) == $(npm view javy version) ]]; then
echo "Skipping publish because the version is already published"
else
npm publish
fi
working-directory: npm/${{ matrix.package }}
working-directory: npm/javy
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 2627a5e

Please sign in to comment.