From 36de7d18d032e437919c67e119d80e8ea2d80e49 Mon Sep 17 00:00:00 2001 From: Denis Rossati Ramos Date: Mon, 30 Mar 2026 15:37:02 -0300 Subject: [PATCH 1/6] Use reusable workflows --- .github/workflows/branch-validations.yaml | 95 ++----------------- .../workflows/deploy-published-releases.yaml | 60 +++--------- 2 files changed, 17 insertions(+), 138 deletions(-) diff --git a/.github/workflows/branch-validations.yaml b/.github/workflows/branch-validations.yaml index 96148d7..11b1175 100644 --- a/.github/workflows/branch-validations.yaml +++ b/.github/workflows/branch-validations.yaml @@ -12,92 +12,9 @@ on: - opened jobs: - security-checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - 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 i -g npm-audit-resolver@3.0.0-7 - npx check-audit --omit dev - - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - 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 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - 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 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - 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: '20' + run-security: true + use-private-registry: false diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index c3a3efc..fc8a5cc 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -7,52 +7,14 @@ on: jobs: deploy-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - env: - NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }} - - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - 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 - rm -rf ~/.npmrc - - - name: Build package - run: |- - npm run build - - - name: Prepare release - run: |- - cp package.json README.md build/ - cd build - sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json - - - name: Publish pre-release to NPM - if: ${{ github.event.release.prerelease }} - run: |- - cd build - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - 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 - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc - 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: "20" + publish-access: "public" + prepare-script: >- + cp package.json README.md build/ && + cd build && + sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json + secrets: + NPM_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }} + PUBLISH_TOKEN: ${{ secrets.NPM_TOKEN }} From 36c0e22b5e46663a1c280baa4df44f163f8502a3 Mon Sep 17 00:00:00 2001 From: Denis Rossati Ramos Date: Wed, 1 Apr 2026 16:06:31 -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 11b1175..166c794 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: '20' run-security: true diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index fc8a5cc..1fec5f7 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -7,7 +7,7 @@ on: jobs: deploy-release: - 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: "20" publish-access: "public" From c088a6173f136cbe5da896781c137626694a4cb4 Mon Sep 17 00:00:00 2001 From: Denis Rossati Ramos Date: Mon, 6 Apr 2026 15:40:53 -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 166c794..f2c4ba1 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: '20' run-security: true use-private-registry: false diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-published-releases.yaml index 1fec5f7..0c002d4 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -9,7 +9,6 @@ jobs: deploy-release: uses: croct-tech/github-workflows/.github/workflows/publish-npm-package.yml@unify-workflows with: - node-version: "20" publish-access: "public" prepare-script: >- cp package.json README.md build/ && From 19dc11eaedd73e483012ca07d6c3fda9ad3faa3b Mon Sep 17 00:00:00 2001 From: Denis Rossati Date: Mon, 13 Apr 2026 10:56:32 -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 f2c4ba1..c52d976 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 0c002d4..6c4e952 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-published-releases.yaml @@ -7,9 +7,8 @@ on: jobs: deploy-release: - 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 package.json README.md build/ && cd build && From 6f80f946fde8753a5b43c3653559b46037087f5a Mon Sep 17 00:00:00 2001 From: Denis Rossati Date: Wed, 15 Apr 2026 11:16:18 -0300 Subject: [PATCH 5/6] Correct workflow --- .../{publish-package-preview.yaml => deploy-preview.yaml} | 2 +- .../{deploy-published-releases.yaml => deploy-release.yaml} | 4 ++-- .../workflows/{release-drafter.yaml => draft-release.yaml} | 4 ++-- .../{send-guidelines.yaml => notify-guidelines.yaml} | 4 ++-- .../{update-release-notes.yaml => sync-release-notes.yaml} | 4 ++-- .../{branch-validations.yaml => validate-branch.yaml} | 4 ++-- .../{check-required-labels.yaml => validate-labels.yaml} | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) rename .github/workflows/{publish-package-preview.yaml => deploy-preview.yaml} (97%) rename .github/workflows/{deploy-published-releases.yaml => deploy-release.yaml} (92%) rename .github/workflows/{release-drafter.yaml => draft-release.yaml} (87%) rename .github/workflows/{send-guidelines.yaml => notify-guidelines.yaml} (96%) rename .github/workflows/{update-release-notes.yaml => sync-release-notes.yaml} (88%) 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-package-preview.yaml b/.github/workflows/deploy-preview.yaml similarity index 97% rename from .github/workflows/publish-package-preview.yaml rename to .github/workflows/deploy-preview.yaml index a4cfd8c..cd0e3e2 100644 --- a/.github/workflows/publish-package-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -1,4 +1,4 @@ -name: Publish package preview +name: Deploy preview on: pull_request: diff --git a/.github/workflows/deploy-published-releases.yaml b/.github/workflows/deploy-release.yaml similarity index 92% rename from .github/workflows/deploy-published-releases.yaml rename to .github/workflows/deploy-release.yaml index 6c4e952..46c453e 100644 --- a/.github/workflows/deploy-published-releases.yaml +++ b/.github/workflows/deploy-release.yaml @@ -1,4 +1,4 @@ -name: Release deploy +name: Deploy release on: release: @@ -6,7 +6,7 @@ on: - published jobs: - deploy-release: + deploy: uses: croct-tech/shared-public-configs/.github/workflows/publish-public-npm-package.yml@master with: prepare-script: >- diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/draft-release.yaml similarity index 87% rename from .github/workflows/release-drafter.yaml rename to .github/workflows/draft-release.yaml index e9103f5..91e131d 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/draft-release.yaml @@ -1,4 +1,4 @@ -name: Release Drafter +name: Draft release on: push: @@ -8,7 +8,7 @@ on: - '**' jobs: - release-draft: + draft: runs-on: ubuntu-latest steps: - name: Update release draft diff --git a/.github/workflows/send-guidelines.yaml b/.github/workflows/notify-guidelines.yaml similarity index 96% rename from .github/workflows/send-guidelines.yaml rename to .github/workflows/notify-guidelines.yaml index 919c5f6..67187fb 100644 --- a/.github/workflows/send-guidelines.yaml +++ b/.github/workflows/notify-guidelines.yaml @@ -1,11 +1,11 @@ -name: Guidelines +name: Notify guidelines on: pull_request: types: - opened jobs: - send-guidelines: + notify: runs-on: ubuntu-latest steps: - uses: wow-actions/auto-comment@v1 diff --git a/.github/workflows/update-release-notes.yaml b/.github/workflows/sync-release-notes.yaml similarity index 88% rename from .github/workflows/update-release-notes.yaml rename to .github/workflows/sync-release-notes.yaml index 0bc9171..1d5937a 100644 --- a/.github/workflows/update-release-notes.yaml +++ b/.github/workflows/sync-release-notes.yaml @@ -1,4 +1,4 @@ -name: Release notes +name: Sync release notes on: push: @@ -8,7 +8,7 @@ on: - '**' jobs: - update-notes: + sync: runs-on: ubuntu-latest steps: - name: Update release draft 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 c52d976..9c9ffff 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 03984e9..af618af 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 6bbbba6022e6366cf581e6d7395c947d0171af6e Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Tue, 21 Apr 2026 16:19:50 +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 af618af..df26040 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