Workflow file for this run
This file contains hidden or 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: Publish Node.js Package to NPM | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # Required for trusted publishing | |
| defaults: | |
| run: | |
| working-directory: ./combicode-js | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Sync shared assets into package | |
| run: | | |
| chmod +x ./scripts/sync-assets.sh | |
| ./scripts/sync-assets.sh | |
| working-directory: . # Run from root | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18.x" | |
| registry-url: "https://registry.npmjs.org/" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Publish to npm | |
| run: npm publish --access public --no-git-checks | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |