Publish to NPM #131
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 to NPM | |
| on: [workflow_dispatch] | |
| defaults: | |
| run: | |
| working-directory: src | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check Out Repo | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| registry-url: "https://registry.npmjs.org" | |
| node-version-file: ./src/.nvmrc | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Copy README.md | |
| run: npm run copy:readme | |
| - name: Build | |
| run: npm run build | |
| env: | |
| NODE_ENV: production | |
| - name: Set public publishing | |
| run: npm config set access public | |
| - name: Publish Dumbo package on NPM 📦 | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| if [[ $VERSION == *"beta"* ]]; then | |
| TAG="beta" | |
| elif [[ $VERSION == *"alpha"* ]]; then | |
| TAG="alpha" | |
| elif [[ $VERSION == *"rc"* ]]; then | |
| TAG="rc" | |
| else | |
| TAG="latest" | |
| fi | |
| npm publish --w @event-driven-io/dumbo --tag $TAG | |
| continue-on-error: true | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_ENV: production | |
| - name: Publish Pongo package on NPM 📦 | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| if [[ $VERSION == *"beta"* ]]; then | |
| TAG="beta" | |
| elif [[ $VERSION == *"alpha"* ]]; then | |
| TAG="alpha" | |
| elif [[ $VERSION == *"rc"* ]]; then | |
| TAG="rc" | |
| else | |
| TAG="latest" | |
| fi | |
| npm publish --w @event-driven-io/pongo --tag $TAG | |
| continue-on-error: true | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_ENV: production |