Skip to content

Deploy to BUILD

Deploy to BUILD #35

name: Deploy to BUILD
on:
workflow_dispatch:
inputs:
package:
description: 'The ID (starts with 04t) or alias of the package version to install'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Install Salesforce CLI'
run: |
wget https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz
mkdir ~/sfdx
tar xJf sf-linux-x64.tar.xz -C ~/sfdx --strip-components 1
echo "$HOME/sfdx/bin" >> $GITHUB_PATH
~/sfdx/bin/sf version
- name: Authenticate with Sandbox
run: |
echo ${{ secrets.SALESFORCE_BUILD_AUTH }} > sfdxurl.txt
sf auth:sfdxurl:store --sfdx-url-file sfdxurl.txt --alias SAT-BUILD
- name: Remove auth file
run: rm -f ./sfdxurl.txt
- name: Deploy Source in dev-app-pre
run: sf project deploy start -d dev-app-pre -o SAT-BUILD -w 15 -l RunLocalTests
- name: Install version ID
run: sf package install --package "${{ github.event.inputs.package }}" -o SAT-BUILD -b 15 --noprompt --wait 10
- name: Re-deploy default objects
run: sf project deploy start -d force-app/main/default/objects -o SAT-BUILD -w 15 -l RunLocalTests --ignore-conflicts
- name: Re-deploy default queues
run: sf project deploy start -d force-app/main/default/queues -o SAT-BUILD -w 15 -l RunLocalTests
- name: Deploy source default OmniStudio-Components
run: sf project deploy start -d OmniStudio-Components -o SAT-BUILD -w 15 -l RunLocalTests
- name: Deploy Source in dev-app-post
run: sf project deploy start -d dev-app-post -o SAT-BUILD -w 15 -l RunLocalTests
# - name: Deploy destructive changes
# run: sfdx force:mdapi:deploy -d destructiveChanges -u SAT-BUILD -o -g -l RunLocalTests -w 15