From 89b9b83fd0d21c4b798617133aab9cf92a25fce0 Mon Sep 17 00:00:00 2001 From: Jan Hoffmann Date: Mon, 10 Jun 2024 06:48:05 +0200 Subject: [PATCH] Support condor-rc branch for releases --- .../workflows/publish-casper-client-sdk.yml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-casper-client-sdk.yml b/.github/workflows/publish-casper-client-sdk.yml index ba0f7d342..6fd54dc20 100644 --- a/.github/workflows/publish-casper-client-sdk.yml +++ b/.github/workflows/publish-casper-client-sdk.yml @@ -10,25 +10,34 @@ on: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - node-version: [16.x] + node-version: [20.x] steps: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2 + - name: Set release tag + run: | + if [ ${{ github.event.release.target_commitish }} == 'condor-rc' ]; then + echo "release_tag=condor-rc" >> $GITHUB_ENV + else + echo "release_tag=latest" >> $GITHUB_ENV + fi - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@5b949b50c3461bbcd5a540b150c368278160234a #v3.4.0 with: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - run: npm install - - name: Publish to NPM - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + tag: ${{ env.release_tag }} + access: "public" + check-version: true - name: Get latest release version number id: get_version uses: battila7/get-version-action@d97fbc34ceb64d1f5d95f4dfd6dce33521ccccf5 #v2.3.0