From f1689887941092f7aa540517cf194bed241d865b Mon Sep 17 00:00:00 2001 From: ventrata-bot Date: Wed, 27 Nov 2024 15:59:09 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/wo?= =?UTF-8?q?rkflows/check-version-pr.yml'=20with=20remote=20'sync/.github/w?= =?UTF-8?q?orkflows/check-version-pr.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-version-pr.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-version-pr.yml b/.github/workflows/check-version-pr.yml index 2fb8b56..5c6341c 100644 --- a/.github/workflows/check-version-pr.yml +++ b/.github/workflows/check-version-pr.yml @@ -12,31 +12,31 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout PR branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + fetch-depth: 0 - - name: Install Node.js - uses: actions/setup-node@v2 + - name: Setup node + uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.9.0 - - name: Get PR version + - name: Get version in pull request id: pr_version run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - name: Checkout main branch - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 with: - ref: master + fetch-depth: 0 - - name: Get main version - id: main_version + - name: Get version in default branch + id: default_branch_version run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Compare versions run: | - if [ "${{ steps.pr_version.outputs.VERSION }}" != "${{ steps.main_version.outputs.VERSION }}" ]; then + if [ "${{ steps.pr_version.outputs.VERSION }}" != "${{ steps.default_branch_version.outputs.VERSION }}" ]; then echo "Version changed: ${{ steps.pr_version.outputs.VERSION }}" else echo "Version did not change" From 06167043ddd144a48d3375ee7ef869875b358b6f Mon Sep 17 00:00:00 2001 From: ventrata-bot Date: Wed, 27 Nov 2024 15:59:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/wo?= =?UTF-8?q?rkflows/npm-publish.yml'=20with=20remote=20'sync/.github/workfl?= =?UTF-8?q?ows/npm-publish.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/npm-publish.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5f26a7d..2cbab5a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,20 +5,31 @@ on: branches: - master - main - workflow_dispatch: + workflow_dispatch: jobs: publish-npm: name: Publish to NPM runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v4 with: - node-version: 20 + fetch-depth: 0 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 22.9.0 registry-url: https://registry.npmjs.org/ - - run: npm install - - run: npm run build - - run: npm publish + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Publish + run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}}