Fix date time casting #11
This file contains hidden or 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: Prod Deployment | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
env: | |
SF_CLI_URL: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz | |
PROD_ORG_ALIAS: prod | |
# Required secrets: | |
# 1. PROD_SFDX_URL - SFDX auth URL of the production org where the package has to be deployed | |
# 2. CODECOV_TOKEN - Codecov token needed for test coverage overview, required only for private repositories | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Install Salesforce CLI' | |
run: | | |
wget ${{ env.SF_CLI_URL }} | |
mkdir ~/sf | |
tar xJf sf-linux-x64.tar.xz -C ~/sf --strip-components 1 | |
echo "$HOME/sf/bin" >> $GITHUB_PATH | |
~/sf/bin/sf version | |
- name: 'Checkout source code' | |
uses: actions/checkout@v3 | |
- name: 'Authenticate Production' | |
shell: bash | |
run: | | |
echo ${{ secrets.PROD_SFDX_URL }} > ./PROD_SFDX_URL.txt | |
secretFileSize=$(wc -c "./PROD_SFDX_URL.txt" | awk '{print $1}') | |
if [ $secretFileSize == 1 ]; then | |
echo "Missing PROD_SFDX_URL secret. Is this workflow running on a fork?"; | |
exit 1; | |
fi | |
sf org:login:sfdx-url -f ./PROD_SFDX_URL.txt -a ${{ env.PROD_ORG_ALIAS }} -d | |
- name: 'Deploy Package' | |
run: sh ./scripts/pkg-deploy.sh ${{ env.PROD_ORG_ALIAS }} |