Skip to content

Commit

Permalink
feat: update ts actions (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgrande924 authored Oct 16, 2023
1 parent c89922d commit 10d9b22
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 7 deletions.
19 changes: 16 additions & 3 deletions actions/ci-test-ts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down
28 changes: 24 additions & 4 deletions actions/cicd-build-publish-artifacts-ts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ inputs:
description: ""
required: false
default: "false"
setup-qemu:
description: ""
required: false
default: "false"
release-assets:
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: ""
Expand Down Expand Up @@ -78,6 +94,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
Expand All @@ -86,11 +106,11 @@ runs:

- name: Run build
shell: bash
run: pnpm nx run-many --target=build
run: pnpm run build ${{ inputs.extra-build-args }}

- name: Run package
shell: bash
run: pnpm nx run-many --target=package
run: pnpm run package ${{ inputs.extra-package-args }}

- name: Prep release cmd
if: inputs.publish-release == 'true'
Expand All @@ -102,7 +122,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
Expand All @@ -112,7 +132,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
Expand Down

0 comments on commit 10d9b22

Please sign in to comment.