diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6ee7cbc..5678c94 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,7 +14,6 @@ jobs: strategy: matrix: node-version: [19.x, 20.x, 21.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v3 @@ -29,3 +28,34 @@ jobs: - run: sudo apt-get install xvfb - run: xvfb-run --auto-servernum npm run test:chrome - run: xvfb-run --auto-servernum npm run test:firefox + + # Separate job for publishing to npm + publish: + runs-on: ubuntu-latest + needs: build # Wait for build to complete + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: "20.x" + cache: "npm" + - run: npm install + - run: npm run build + + - name: Publish to npm dry-run + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + npm publish --dry-run + + - name: Publish to npm + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + npm publish diff --git a/README.md b/README.md index 71a3286..e2cc782 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ npm i @puremvc/puremvc-js-multicore-framework * [React Native](https://en.wikipedia.org/wiki/React_Native) ## Status -Production - [Version 2.0.8](https://github.com/PureMVC/puremvc-js-multicore-framework/blob/master/VERSION) +Production - [Version 2.0.9](https://github.com/PureMVC/puremvc-js-multicore-framework/blob/master/VERSION) #### Documentation - https://jsdoc.app/about-commandline.html diff --git a/VERSION b/VERSION index adeb862..5aae294 100644 --- a/VERSION +++ b/VERSION @@ -4,7 +4,7 @@ Release Date: 9/4/24 Platform: JavaScript Version: 2 Revision: 0 - Minor: 8 + Minor: 9 Authors: Saad Shams : David Foley : Cliff Hall @@ -18,3 +18,4 @@ Release Date: 9/4/24 2.0.6 - NPM package bundling the ESM/CommonJS support 2.0.7 - Finally? NPM bundling 2.0.8 - CI/CD Pipeline +2.0.9 - CI/CD Integrating Automated Tokens diff --git a/package.json b/package.json index 84fd764..c26c998 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@puremvc/puremvc-js-multicore-framework", - "version": "2.0.8", + "version": "2.0.9", "description": "PureMVC MultiCore Framework for JavaScript", "type": "module", "main": "bin/cjs/index.cjs",