diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 432888f94..cbc6f3ad3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,3 +69,19 @@ jobs: node-version: ${{ matrix.node }} - run: npm ci - run: npx bundlesize + publish: + if: ${{ github.ref == 'refs/heads/release' }} + needs: [build, unit-test, smoke-test, lint] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + registry-url: https://registry.npmjs.org/ + - run: node --version + - run: npm ci + - run: npm run rebuild-docker-image + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index a5bc0449c..000000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Publish to NPM -on: - workflow_run: - branches: - - release - workflows: - - ci - types: - - completed -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ - - run: node --version - - run: npm ci - - run: npm run rebuild-docker-image - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}