Slight optimization in codegen (#856) #285
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NPM package publishing | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish_npm: | |
name: Publish javy NPM package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
- name: Install package dependencies | |
run: npm install | |
working-directory: npm/javy | |
- name: Build NPM package | |
run: npm run build | |
working-directory: npm/javy | |
- name: Publish NPM package if new version | |
run: | | |
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/javy | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |