From 285eeec0b64820479a7947642eea919a69b43aaf Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:23:17 +0100 Subject: [PATCH 01/11] ci(ipa): fix IPA release tag creation --- .github/workflows/ipa-release.yml | 54 ++++++++++++++++--------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index e3263827ed..8a1801763f 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -59,31 +59,33 @@ jobs: - name: Get the latest commit SHA id: get-sha run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - - name: Create release tag - uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 - with: - tag: 'ipa-validation-ruleset-v${{ needs.check-version.outputs.current_version }}' - commit_sha: ${{ steps.get-sha.outputs.sha }} - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - gpg_passphrase: ${{ secrets.PASSPHRASE }} + - name: Test + run: echo "creating tag ipa-validation-ruleset-v${needs.check-version.outputs.current_version} for sha ${steps.get-sha.outputs.sha}" +# - name: Create release tag +# uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 +# with: +# tag: 'ipa-validation-ruleset-v${{ needs.check-version.outputs.current_version }}' +# commit_sha: ${{ steps.get-sha.outputs.sha }} +# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} +# gpg_passphrase: ${{ secrets.PASSPHRASE }} - publish: - needs: check-version - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - if: ${{ needs.check-version.outputs.version_changed == 'true' || inputs.workflow_call }} - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - working-directory: tools/spectral/ipa - - run: npm publish --access public - working-directory: tools/spectral/ipa - env: - NODE_AUTH_TOKEN: ${{ secrets.IPA_VALIDATION_NPM_TOKEN }} +# publish: +# needs: check-version +# runs-on: ubuntu-latest +# permissions: +# contents: read +# id-token: write +# if: ${{ needs.check-version.outputs.version_changed == 'true' || inputs.workflow_call }} +# steps: +# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 +# - uses: actions/setup-node@v4 +# with: +# node-version: '20.x' +# registry-url: 'https://registry.npmjs.org' +# - run: npm ci +# working-directory: tools/spectral/ipa +# - run: npm publish --access public +# working-directory: tools/spectral/ipa +# env: +# NODE_AUTH_TOKEN: ${{ secrets.IPA_VALIDATION_NPM_TOKEN }} \ No newline at end of file From 9ee0ddf8c21c29605d91352f43ec742c3393cfea Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:26:19 +0100 Subject: [PATCH 02/11] fix: substitution --- .github/workflows/ipa-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index 8a1801763f..1bf91cb208 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -60,7 +60,7 @@ jobs: id: get-sha run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Test - run: echo "creating tag ipa-validation-ruleset-v${needs.check-version.outputs.current_version} for sha ${steps.get-sha.outputs.sha}" + run: echo "creating tag ipa-validation-ruleset-v${{needs.check-version.outputs.current_version}} for sha ${{steps.get-sha.outputs.sha}}" # - name: Create release tag # uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # with: From 9c4956c2fe80abd005ed5a49266e9bed740ce454 Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:26:45 +0100 Subject: [PATCH 03/11] fix: test without existing tag input --- .github/workflows/ipa-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index 1bf91cb208..151fc1d4fa 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -8,9 +8,9 @@ on: type: boolean required: false default: true - use_existing_tag: - description: 'Set value to `true` to use an existing tag for the release process, default is `false`' - default: 'false' +# use_existing_tag: +# description: 'Set value to `true` to use an existing tag for the release process, default is `false`' +# default: 'false' push: branches: - main From a99daf19aee266ec7ae88dbbcf937503aa2f176a Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:30:24 +0100 Subject: [PATCH 04/11] fix: test with undef input --- .github/workflows/ipa-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index 151fc1d4fa..f91c8284de 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -49,7 +49,7 @@ jobs: needs: check-version if: >- !cancelled() - && inputs.use_existing_tag == 'false' + && (!inputs.use_existing_tag || inputs.use_existing_tag == 'false') steps: - name: Validation of version format run: | From 1821776b4161fbe6e7f77382bb43b5dfc4981992 Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:34:24 +0100 Subject: [PATCH 05/11] fix: test with existing tag input --- .github/workflows/ipa-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index f91c8284de..1b70a9ebaf 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -8,9 +8,9 @@ on: type: boolean required: false default: true -# use_existing_tag: -# description: 'Set value to `true` to use an existing tag for the release process, default is `false`' -# default: 'false' + use_existing_tag: + description: 'Set value to `true` to use an existing tag for the release process, default is `false`' + default: 'false' push: branches: - main From d1ae4cd4c4ecae72c74309d240b780c6712c09f0 Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:40:20 +0100 Subject: [PATCH 06/11] fix: only create tag when version changed --- .github/workflows/ipa-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index 1b70a9ebaf..5ea42eb4c7 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -49,7 +49,7 @@ jobs: needs: check-version if: >- !cancelled() - && (!inputs.use_existing_tag || inputs.use_existing_tag == 'false') + && (!inputs.use_existing_tag && needs.check-version.outputs.version_changed == 'true') steps: - name: Validation of version format run: | From 2a062b1e3fa5eace62699b73c249c33fefd89145 Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:42:05 +0100 Subject: [PATCH 07/11] test: bump version --- tools/spectral/ipa/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/spectral/ipa/package.json b/tools/spectral/ipa/package.json index 9967158307..cfd16c9840 100644 --- a/tools/spectral/ipa/package.json +++ b/tools/spectral/ipa/package.json @@ -1,6 +1,6 @@ { "name": "@mongodb-js/ipa-validation-ruleset", - "version": "1.0.0", + "version": "1.1.0", "description": "Custom validation rules for MongoDB API Standards (IPA).", "keywords": [ "mongodb", From d8848f51c3f73a187ea35f8605128d767299da4a Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:45:53 +0100 Subject: [PATCH 08/11] fix --- .github/workflows/ipa-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index 5ea42eb4c7..305bd30c0b 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -49,7 +49,8 @@ jobs: needs: check-version if: >- !cancelled() - && (!inputs.use_existing_tag && needs.check-version.outputs.version_changed == 'true') + && (!inputs.use_existing_tag || inputs.use_existing_tag == 'false') + && needs.check-version.outputs.version_changed == 'true' steps: - name: Validation of version format run: | From f2518748fd6e1c24e511984ca65ba248c2f5a9d6 Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:47:43 +0100 Subject: [PATCH 09/11] revert: test: bump version --- tools/spectral/ipa/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/spectral/ipa/package.json b/tools/spectral/ipa/package.json index cfd16c9840..9967158307 100644 --- a/tools/spectral/ipa/package.json +++ b/tools/spectral/ipa/package.json @@ -1,6 +1,6 @@ { "name": "@mongodb-js/ipa-validation-ruleset", - "version": "1.1.0", + "version": "1.0.0", "description": "Custom validation rules for MongoDB API Standards (IPA).", "keywords": [ "mongodb", From 726e9832c49f0da32f70d5a683539de3d88c3dbd Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:49:14 +0100 Subject: [PATCH 10/11] fix: uncomment workflow --- .github/workflows/ipa-release.yml | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index 305bd30c0b..bf969f6674 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -62,31 +62,31 @@ jobs: run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Test run: echo "creating tag ipa-validation-ruleset-v${{needs.check-version.outputs.current_version}} for sha ${{steps.get-sha.outputs.sha}}" -# - name: Create release tag -# uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 -# with: -# tag: 'ipa-validation-ruleset-v${{ needs.check-version.outputs.current_version }}' -# commit_sha: ${{ steps.get-sha.outputs.sha }} -# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} -# gpg_passphrase: ${{ secrets.PASSPHRASE }} + - name: Create release tag + uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 + with: + tag: 'ipa-validation-ruleset-v${{ needs.check-version.outputs.current_version }}' + commit_sha: ${{ steps.get-sha.outputs.sha }} + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg_passphrase: ${{ secrets.PASSPHRASE }} -# publish: -# needs: check-version -# runs-on: ubuntu-latest -# permissions: -# contents: read -# id-token: write -# if: ${{ needs.check-version.outputs.version_changed == 'true' || inputs.workflow_call }} -# steps: -# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 -# - uses: actions/setup-node@v4 -# with: -# node-version: '20.x' -# registry-url: 'https://registry.npmjs.org' -# - run: npm ci -# working-directory: tools/spectral/ipa -# - run: npm publish --access public -# working-directory: tools/spectral/ipa -# env: -# NODE_AUTH_TOKEN: ${{ secrets.IPA_VALIDATION_NPM_TOKEN }} + publish: + needs: check-version + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + if: ${{ needs.check-version.outputs.version_changed == 'true' || inputs.workflow_call }} + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + working-directory: tools/spectral/ipa + - run: npm publish --access public + working-directory: tools/spectral/ipa + env: + NODE_AUTH_TOKEN: ${{ secrets.IPA_VALIDATION_NPM_TOKEN }} \ No newline at end of file From 66ebc4b5ad4a373ed193fb495bec6f50c1c3aef1 Mon Sep 17 00:00:00 2001 From: Lovisa Berggren Date: Wed, 13 Aug 2025 16:50:30 +0100 Subject: [PATCH 11/11] fix --- .github/workflows/ipa-release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ipa-release.yml b/.github/workflows/ipa-release.yml index bf969f6674..2e75b250cb 100644 --- a/.github/workflows/ipa-release.yml +++ b/.github/workflows/ipa-release.yml @@ -60,8 +60,6 @@ jobs: - name: Get the latest commit SHA id: get-sha run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - - name: Test - run: echo "creating tag ipa-validation-ruleset-v${{needs.check-version.outputs.current_version}} for sha ${{steps.get-sha.outputs.sha}}" - name: Create release tag uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 with: