diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 25dda9bb..ef74d065 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -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 @@ -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 }}