Create Quantic Package #1259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Quantic Package | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 22 * * *' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
create-and-promote-quantic-package: | |
environment: 'Quantic Staging' | |
name: Create Quantic Package | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Check Out Repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Create cache file | |
run: | | |
mkdir check-SHA | |
echo ${{ github.sha }} > github-sha.txt | |
- name: Check SHA | |
id: check_sha | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4 | |
with: | |
path: check-SHA | |
key: check-SHA-${{ github.sha }} | |
- name: Cancel current workflow run if no changes made | |
if: steps.check_sha.outputs.cache-hit == 'true' | |
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7 | |
with: | |
script: | | |
github.rest.actions.cancelWorkflowRun({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
run_id: context.runId | |
}) | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Setup SFDX | |
uses: ./.github/actions/setup-sfdx | |
- name: Create package version | |
working-directory: ./packages/quantic | |
run: | | |
echo "${{ secrets.SFDX_AUTH_JWT_KEY }}" > ${{ vars.SFDX_AUTH_JWT_KEY_FILE }} | |
npx --no-install ts-node scripts/build/create-package.ts --remove-translations --ci | |
rm ${{ vars.SFDX_AUTH_JWT_KEY_FILE }} | |
env: | |
SFDX_AUTH_JWT_USERNAME: ${{ vars.SFDX_AUTH_JWT_USERNAME }} | |
SFDX_AUTH_JWT_KEY_FILE: ${{ vars.SFDX_AUTH_JWT_KEY_FILE }} | |
SFDX_AUTH_CLIENT_ID: ${{ secrets.SFDX_AUTH_CLIENT_ID }} |