From c516f7bcb54d01f696d0ea1e5737f8ae2f872614 Mon Sep 17 00:00:00 2001 From: Adil Rakhaliyev <67043367+Bayheck@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:02:22 +0500 Subject: [PATCH] update: publish jobs update (#8317) ## Purpose _Describe the problem you want to address or the feature you want to implement._ ## Approach _Describe how your changes address the issue or implement the desired functionality in as much detail as possible._ ## References _Provide a link to the existing issue(s), if any._ ## Pre-Merge TODO - [ ] Write tests for your proposed changes - [ ] Make sure that existing tests do not fail Co-authored-by: Bayheck --- .github/workflows/publish.yml | 21 +++++++++++++++++++-- .publishrc | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6a6682cc5b1..5b99bf150ce 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,10 +5,27 @@ on: types: [published] jobs: - publish: + npm-publish: if: ${{ !github.event.release.draft }} runs-on: ubuntu-latest environment: release + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.release.target_commitish }} + - run: git fetch --force --tags + - uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm run publish-please-only + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + docker-publish: + needs: npm-publish + runs-on: ubuntu-latest + environment: release steps: - uses: actions/checkout@v3 with: @@ -23,6 +40,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - run: npm install - - run: npm run publish-please-only + - run: gulp docker-publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.publishrc b/.publishrc index ef370e94b52..bba855ae5f7 100644 --- a/.publishrc +++ b/.publishrc @@ -10,5 +10,5 @@ "confirm": false, "publishTag": "rc", "prePublishScript": "gulp test-server", - "postPublishScript": "gulp docker-publish" + "postPublishScript": "" }