From 628ae9f97a5b5bb63cdbf4b3b4be9f1c84672bc1 Mon Sep 17 00:00:00 2001 From: Sergey Rymsha Date: Wed, 1 Jul 2026 10:21:19 +0200 Subject: [PATCH] Move npm publishing into build-and-publish #2218 Use npmPublish on build-and-publish and drop the upload/download artifact shuffle and the separate npm-publish job. Closes #2218 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/enonic-gradle.yml | 38 +---------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/.github/workflows/enonic-gradle.yml b/.github/workflows/enonic-gradle.yml index 911eb839c..2b18567ab 100644 --- a/.github/workflows/enonic-gradle.yml +++ b/.github/workflows/enonic-gradle.yml @@ -18,47 +18,11 @@ jobs: repoUser: ci repoPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} codecovToken: ${{ secrets.CODECOV_TOKEN }} + npmPublish: true releaseBranch: | 7.x 6.x - - name: Upload npm package - if: steps.build-and-publish.outputs.release == 'true' - uses: actions/upload-artifact@v7 - with: - name: npm-package - path: build/types - - npm-publish: - runs-on: ubuntu-latest - needs: build - if: needs.build.outputs.release == 'true' - steps: - - name: Download npm package - uses: actions/download-artifact@v8 - with: - name: npm-package - path: build/types - - - name: Set up Node - uses: actions/setup-node@v6 - with: - node-version: '24.x' - registry-url: 'https://registry.npmjs.org' - - - name: Set npm tag - run: | - VERSION=$(node -p "require('./build/types/package.json').version") - if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "NPM_TAG=latest" >> $GITHUB_ENV - else - echo "NPM_TAG=beta" >> $GITHUB_ENV - fi - - - name: Publish to npm - working-directory: build/types - run: npm publish --tag $NPM_TAG - release: runs-on: ubuntu-latest