From 687159191e303d5ead9724a355757534837cfb86 Mon Sep 17 00:00:00 2001 From: ajgrande924 Date: Thu, 12 Oct 2023 11:46:07 -0400 Subject: [PATCH 1/5] fix: ci-test-ts --- actions/ci-test-ts/action.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/actions/ci-test-ts/action.yml b/actions/ci-test-ts/action.yml index b6b0a847..c856145c 100644 --- a/actions/ci-test-ts/action.yml +++ b/actions/ci-test-ts/action.yml @@ -11,6 +11,14 @@ inputs: description: "number of commits to fetch" required: false default: "0" + check-only-affected: + description: "" + required: false + default: "false" + base-ref: + description: "" + required: false + default: main # grafana cloud inputs metrics-job-name: description: "grafana metrics job name" @@ -50,10 +58,15 @@ runs: run-install: "true" continue-on-error: true - # TODO: optimization - implement nx affected on pull request - - name: Run test + - name: Run lint + if: inputs.check-only-affected != 'true' + shell: bash + run: pnpm run lint + + - name: Run lint affected + if: inputs.check-only-affected == 'true' shell: bash - run: pnpm nx run-many --targets=test + run: pnpm run lint:affected --base=${{ inputs.base-ref }} - name: Collect metrics if: always() From 2404ab7a7a4ddbf4dbcdc8c852b3738f216bb467 Mon Sep 17 00:00:00 2001 From: ajgrande924 Date: Thu, 12 Oct 2023 11:57:11 -0400 Subject: [PATCH 2/5] fix: cicd-build-publish-artifacts-ts --- actions/cicd-build-publish-artifacts-ts/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/cicd-build-publish-artifacts-ts/action.yml b/actions/cicd-build-publish-artifacts-ts/action.yml index 365c9c73..d8f8860d 100644 --- a/actions/cicd-build-publish-artifacts-ts/action.yml +++ b/actions/cicd-build-publish-artifacts-ts/action.yml @@ -86,11 +86,11 @@ runs: - name: Run build shell: bash - run: pnpm nx run-many --target=build + run: pnpm run build - name: Run package shell: bash - run: pnpm nx run-many --target=package + run: pnpm run package - name: Prep release cmd if: inputs.publish-release == 'true' From 5bf217c82973f8352c5d83a817bdd4ed3110684c Mon Sep 17 00:00:00 2001 From: ajgrande924 Date: Thu, 12 Oct 2023 12:49:33 -0400 Subject: [PATCH 3/5] chore: add qemu --- actions/cicd-build-publish-artifacts-ts/action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/actions/cicd-build-publish-artifacts-ts/action.yml b/actions/cicd-build-publish-artifacts-ts/action.yml index d8f8860d..00b59694 100644 --- a/actions/cicd-build-publish-artifacts-ts/action.yml +++ b/actions/cicd-build-publish-artifacts-ts/action.yml @@ -15,6 +15,10 @@ inputs: description: "" required: false default: "false" + setup-qemu: + description: "" + required: false + default: "false" # monorepo inputs publish-monorepo-release: description: "" @@ -78,6 +82,10 @@ runs: run-install: "true" continue-on-error: true + - name: Set up qemu + if: inputs.setup-qemu == 'true' + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - name: Setup foundry if: inputs.setup-foundry == 'true' uses: foundry-rs/foundry-toolchain@cb603ca0abb544f301eaed59ac0baf579aa6aecf # v1.0.10 From 15bde2260feb8aa41c2e469926964834d1fc53a6 Mon Sep 17 00:00:00 2001 From: ajgrande924 Date: Thu, 12 Oct 2023 16:37:33 -0400 Subject: [PATCH 4/5] feat: add release assets --- actions/cicd-build-publish-artifacts-ts/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/actions/cicd-build-publish-artifacts-ts/action.yml b/actions/cicd-build-publish-artifacts-ts/action.yml index 00b59694..67a54509 100644 --- a/actions/cicd-build-publish-artifacts-ts/action.yml +++ b/actions/cicd-build-publish-artifacts-ts/action.yml @@ -19,6 +19,10 @@ inputs: description: "" required: false default: "false" + release-assets: + description: "" + required: false + default: "bin/*" # monorepo inputs publish-monorepo-release: description: "" @@ -110,7 +114,7 @@ runs: uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2.7.0 with: repo_token: ${{ github.token }} - file: bin/* + file: ${{ inputs.release-assets }} tag: ${{ inputs.release-version }} overwrite: true file_glob: true @@ -120,7 +124,7 @@ runs: uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2.7.0 with: repo_token: ${{ github.token }} - file: ${{ inputs.monorepo-release-dir }}/${{ inputs.monorepo-release-name }}/bin/* + file: ${{ inputs.monorepo-release-dir }}/${{ inputs.monorepo-release-name }}/${{ inputs.release-assets }} tag: ${{ inputs.monorepo-release-name }}@${{ inputs.monorepo-release-version }} overwrite: true file_glob: true From fe57130291d960503eef6b1179997a290c690ab4 Mon Sep 17 00:00:00 2001 From: ajgrande924 Date: Thu, 12 Oct 2023 16:46:47 -0400 Subject: [PATCH 5/5] feat: add extra args --- actions/cicd-build-publish-artifacts-ts/action.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/actions/cicd-build-publish-artifacts-ts/action.yml b/actions/cicd-build-publish-artifacts-ts/action.yml index 67a54509..9afc5e79 100644 --- a/actions/cicd-build-publish-artifacts-ts/action.yml +++ b/actions/cicd-build-publish-artifacts-ts/action.yml @@ -23,6 +23,14 @@ inputs: description: "" required: false default: "bin/*" + extra-build-args: + description: "" + required: false + default: "" + extra-package-args: + description: "" + required: false + default: "" # monorepo inputs publish-monorepo-release: description: "" @@ -98,11 +106,11 @@ runs: - name: Run build shell: bash - run: pnpm run build + run: pnpm run build ${{ inputs.extra-build-args }} - name: Run package shell: bash - run: pnpm run package + run: pnpm run package ${{ inputs.extra-package-args }} - name: Prep release cmd if: inputs.publish-release == 'true'