fix: build system #14
Workflow file for this run
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: Release Please | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: # Allow manual triggering | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
config-file: release-please-config.json | |
manifest-file: .release-please-manifest.json | |
publish-npm: | |
needs: release-please | |
# This is the key fix - only run this job when a release is created | |
if: ${{ needs.release-please.outputs.releases_created }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Publish package | |
run: | | |
npm ci | |
npm test | |
npm run build | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |