From e95e51958045c29a536901c237ad7fe7b64b12f3 Mon Sep 17 00:00:00 2001 From: Denis Rossati Ramos Date: Mon, 30 Mar 2026 16:00:31 -0300 Subject: [PATCH 1/6] Use reusable workflows --- .github/workflows/branch-validations.yaml | 100 ++---------------- .../workflows/deploy-published-releases.yaml | 61 +++-------- 2 files changed, 19 insertions(+), 142 deletions(-) diff --git a/.github/workflows/branch-validations.yaml b/.github/workflows/branch-validations.yaml index c1d68848..f2111b2f 100644 --- a/.github/workflows/branch-validations.yaml +++ b/.github/workflows/branch-validations.yaml @@ -12,97 +12,9 @@ on: - opened jobs: - security-checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - registry-url: 'https://registry.npmjs.org' - node-version: 23 - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v5 - with: - path: node_modules - key: node_modules-${{ hashFiles('package-lock.json') }} - - - name: Install dependencies - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: npm ci - - - name: Check dependency vulnerabilities - run: npm audit --omit=dev - - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - node-version: 23 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v5 - with: - path: node_modules - key: node_modules-${{ hashFiles('package-lock.json') }} - - - name: Install dependencies - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: npm ci - - - name: Check compilation errors - run: npm run validate - - lint: - runs-on: ubuntu-latest - needs: - - validate - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - node-version: 23 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v5 - with: - path: node_modules - key: node_modules-${{ hashFiles('package-lock.json') }} - - - name: Install dependencies - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: npm ci - - - name: Check coding standard violations - run: npm run lint - - test: - runs-on: ubuntu-latest - needs: - - validate - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - node-version: 23 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v5 - with: - path: node_modules - key: node_modules-${{ hashFiles('package-lock.json') }} - - - name: Install dependencies - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: npm ci - - - name: Run tests - run: npm run test + validations: + uses: croct-tech/github-workflows/.github/workflows/general/javascript-validations.yml@unify-workflows + with: + node-version: '23' + run-security: true + use-private-registry: false diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index 07868817..bf6f6311 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -7,51 +7,16 @@ on: jobs: deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - registry-url: 'https://registry.npmjs.org' - node-version: 23 - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v5 - with: - path: node_modules - key: node_modules-${{ hashFiles('package-lock.json') }} - - - name: Install dependencies - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: npm ci - - - name: Build package - run: npm run build - - - name: Prepare release - run: |- - cp LICENSE README.md build/ - cd build - find . -type f -path '*/*\.js.map' -exec sed -i -e "s~../src~src~" {} + - sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json - sed -i -e "s~\./build~.~" package.json - sed -i -e "s~./src~.~" package.json - - - name: Publish pre-release to NPM - if: ${{ github.event.release.prerelease }} - run: |- - cd build - npm publish --access public --tag next - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Publish release to NPM - if: ${{ !github.event.release.prerelease }} - run: |- - cd build - npm publish --access public - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + uses: croct-tech/github-workflows/.github/workflows/general/publish-npm-package.yml@unify-workflows + with: + node-version: "23" + publish-access: "public" + prepare-script: >- + cp LICENSE README.md build/ && + cd build && + find . -type f -path '*/*\.js.map' -exec sed -i -e "s~../src~src~" {} + && + sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json && + sed -i -e "s~\./build~.~" package.json && + sed -i -e "s~./src~.~" package.json + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From 40b6c42fd7535b851aac33e5f4ee3da4fe17bc30 Mon Sep 17 00:00:00 2001 From: Denis Rossati Ramos Date: Wed, 1 Apr 2026 16:09:35 -0300 Subject: [PATCH 2/6] Update workflow --- .github/workflows/branch-validations.yaml | 2 +- .github/workflows/deploy-published-releases.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branch-validations.yaml b/.github/workflows/branch-validations.yaml index f2111b2f..8e9fefb0 100644 --- a/.github/workflows/branch-validations.yaml +++ b/.github/workflows/branch-validations.yaml @@ -13,7 +13,7 @@ on: jobs: validations: - uses: croct-tech/github-workflows/.github/workflows/general/javascript-validations.yml@unify-workflows + uses: croct-tech/github-workflows/.github/workflows/javascript-validation.yml@unify-workflows with: node-version: '23' run-security: true diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index bf6f6311..3a84115e 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -7,7 +7,7 @@ on: jobs: deploy: - uses: croct-tech/github-workflows/.github/workflows/general/publish-npm-package.yml@unify-workflows + uses: croct-tech/github-workflows/.github/workflows/publish-npm-package.yml@unify-workflows with: node-version: "23" publish-access: "public" From 65785e9dda757571d3bfa54e43805eb1fd2f435a Mon Sep 17 00:00:00 2001 From: Denis Rossati Ramos Date: Mon, 6 Apr 2026 15:43:02 -0300 Subject: [PATCH 3/6] Set default node version --- .github/workflows/branch-validations.yaml | 3 +-- .github/workflows/deploy-published-releases.yaml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/branch-validations.yaml b/.github/workflows/branch-validations.yaml index 8e9fefb0..f2c4ba11 100644 --- a/.github/workflows/branch-validations.yaml +++ b/.github/workflows/branch-validations.yaml @@ -13,8 +13,7 @@ on: jobs: validations: - uses: croct-tech/github-workflows/.github/workflows/javascript-validation.yml@unify-workflows + uses: croct-tech/renovate-public-presets/.github/workflows/javascript-validations.yml@unify-workflows with: - node-version: '23' run-security: true use-private-registry: false diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index 3a84115e..7c200879 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -9,7 +9,6 @@ jobs: deploy: uses: croct-tech/github-workflows/.github/workflows/publish-npm-package.yml@unify-workflows with: - node-version: "23" publish-access: "public" prepare-script: >- cp LICENSE README.md build/ && From 54e99073085b0dd0010fdee977c30e4bb423810a Mon Sep 17 00:00:00 2001 From: Denis Rossati Date: Mon, 13 Apr 2026 11:02:21 -0300 Subject: [PATCH 4/6] Correct workflow --- .github/workflows/branch-validations.yaml | 3 +-- .github/workflows/deploy-published-releases.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/branch-validations.yaml b/.github/workflows/branch-validations.yaml index f2c4ba11..c52d9769 100644 --- a/.github/workflows/branch-validations.yaml +++ b/.github/workflows/branch-validations.yaml @@ -13,7 +13,6 @@ on: jobs: validations: - uses: croct-tech/renovate-public-presets/.github/workflows/javascript-validations.yml@unify-workflows + uses: croct-tech/shared-public-configs/.github/workflows/javascript-validations.yml@master with: - run-security: true use-private-registry: false diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index 7c200879..ecff06fa 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -7,9 +7,8 @@ on: jobs: deploy: - uses: croct-tech/github-workflows/.github/workflows/publish-npm-package.yml@unify-workflows + uses: croct-tech/shared-public-configs/.github/workflows/publish-public-npm-package.yml@master with: - publish-access: "public" prepare-script: >- cp LICENSE README.md build/ && cd build && From 89b8b90c92edfba939d6c70d2e06be89c927a20a Mon Sep 17 00:00:00 2001 From: Denis Rossati Date: Wed, 15 Apr 2026 11:51:00 -0300 Subject: [PATCH 5/6] Correct workflow --- .../{publish-pr-preview.yaml => deploy-preview.yaml} | 4 ++-- .../{deploy-published-releases.yaml => deploy-release.yaml} | 2 +- .../{branch-validations.yaml => validate-branch.yaml} | 4 ++-- .../{check-required-labels.yaml => validate-labels.yaml} | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename .github/workflows/{publish-pr-preview.yaml => deploy-preview.yaml} (96%) rename .github/workflows/{deploy-published-releases.yaml => deploy-release.yaml} (96%) rename .github/workflows/{branch-validations.yaml => validate-branch.yaml} (89%) rename .github/workflows/{check-required-labels.yaml => validate-labels.yaml} (90%) diff --git a/.github/workflows/publish-pr-preview.yaml b/.github/workflows/deploy-preview.yaml similarity index 96% rename from .github/workflows/publish-pr-preview.yaml rename to .github/workflows/deploy-preview.yaml index 80c932b3..9cb27cf4 100644 --- a/.github/workflows/publish-pr-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -1,4 +1,4 @@ -name: Publish PR preview +name: Deploy preview on: pull_request: @@ -7,7 +7,7 @@ on: - opened jobs: - preview: + deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-release.yaml similarity index 96% rename from .github/workflows/deploy-published-releases.yaml rename to .github/workflows/deploy-release.yaml index ecff06fa..ca90f7d4 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-release.yaml @@ -1,4 +1,4 @@ -name: Release +name: Deploy release on: release: diff --git a/.github/workflows/branch-validations.yaml b/.github/workflows/validate-branch.yaml similarity index 89% rename from .github/workflows/branch-validations.yaml rename to .github/workflows/validate-branch.yaml index c52d9769..9c9ffff7 100644 --- a/.github/workflows/branch-validations.yaml +++ b/.github/workflows/validate-branch.yaml @@ -1,4 +1,4 @@ -name: Validations +name: Validate branch on: push: @@ -12,7 +12,7 @@ on: - opened jobs: - validations: + validate: uses: croct-tech/shared-public-configs/.github/workflows/javascript-validations.yml@master with: use-private-registry: false diff --git a/.github/workflows/check-required-labels.yaml b/.github/workflows/validate-labels.yaml similarity index 90% rename from .github/workflows/check-required-labels.yaml rename to .github/workflows/validate-labels.yaml index 03984e95..af618af1 100644 --- a/.github/workflows/check-required-labels.yaml +++ b/.github/workflows/validate-labels.yaml @@ -1,4 +1,4 @@ -name: Label requirements +name: Validate labels on: pull_request: types: @@ -9,7 +9,7 @@ on: - unlabeled jobs: - check-labels: + validate: name: Check labels runs-on: ubuntu-latest steps: From 3b82f8456e6a1e49d0691c0b21527f9615e43385 Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Tue, 21 Apr 2026 16:22:32 +0000 Subject: [PATCH 6/6] Applied workflow standards --- .github/workflows/validate-labels.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validate-labels.yaml b/.github/workflows/validate-labels.yaml index af618af1..df260409 100644 --- a/.github/workflows/validate-labels.yaml +++ b/.github/workflows/validate-labels.yaml @@ -10,7 +10,6 @@ on: jobs: validate: - name: Check labels runs-on: ubuntu-latest steps: - uses: docker://agilepathway/pull-request-label-checker:latest