diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 0a488132..e65c1832 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -4,9 +4,9 @@ on: push: branches: - '**' - pull_request: - branches: - - '**' + # pull_request: + # branches: + # - '**' jobs: build-and-test: diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml new file mode 100644 index 00000000..7df956eb --- /dev/null +++ b/.github/workflows/publish-package.yml @@ -0,0 +1,55 @@ +name: 🚀 Publish NPM Package + +on: + pull_request: + branches: + - '**' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + actions: write + packages: write + pull-requests: write + + steps: + - name: 📥 Checkout Code Repository + uses: actions/checkout@v4 + + - name: 🔧 Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + registry-url: 'https://registry.npmjs.org/' + + - name: List files + run: ls -la ~/ + + - name: Create .npmrc + run: | + echo "@tekdi:registry=https://registry.npmjs.org/" > ~/.npmrc + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc + + - name: Display .npmrc contents + run: cat ~/.npmrc + + - name: 📦 Install Dependencies + run: npm ci + + - name: 🛠️ Build Library + run: npm run build-lib + + - name: List contents of dist/quml-library + run: ls -la dist/quml-library + + - name: 🚢 Publish to NPM + run: | + cd dist/quml-library + pwd # Print the current directory + ls -la # List the contents to ensure the package is present + npm publish --tag=beta --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/projects/quml-library/package.json b/projects/quml-library/package.json index 6611fcdf..a857a02b 100644 --- a/projects/quml-library/package.json +++ b/projects/quml-library/package.json @@ -1,6 +1,6 @@ { "name": "@tekdi/sunbird-quml-player", - "version": "8.0.0", + "version": "9.0.0-beta.8", "schematics": "./schematics/collection.json", "ng-add": { "save": "dependencies"