-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb691b6
commit bfbe9ed
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release The Kraken | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: Tag from where the artifact is going to be downloaded and used as base for the deploy | ||
type: string | ||
required: true | ||
environment: | ||
description: Environment that is going to be used | ||
type: string | ||
required: true | ||
|
||
# Jobs to be executed | ||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
container: tnascimento013/latam_salesforcedx_industries_orgdevmodebuilds:latest | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- name: Installing missing CLIs / Plugins | ||
run: echo "y" | sf plugins install sf-orgdevmode-builds | ||
|
||
- name: Download Artifact | ||
uses: dsaltares/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: tags/${{ inputs.tag }} | ||
file: ${{ github.event.repository.name }}-${{ inputs.tag }}.tar.gz | ||
|
||
- name: Unzip artifact | ||
####run: unzip ${{ github.event.repository.name }}-${{ inputs.tag }}.zip -d outputdir/ | ||
run: tar -xzf ${{ github.event.repository.name }}-${{ inputs.tag }}.tar.gz -C outputdir/ | ||
|
||
- name: Extracting private key Non Prod | ||
if: ${{ inputs.environment != 'prod' }} | ||
working-directory: ./outputdir/ | ||
run: 'echo "${{ secrets.JWT_KEY_NONPROD }}" > server.key' | ||
|
||
- name: Extracting private key Prod | ||
if: ${{ inputs.environment == 'prod' }} | ||
working-directory: ./outputdir/ | ||
run: 'echo "${{ secrets.JWT_KEY_PROD }}" > server.key' | ||
|
||
- name: Running the build & deploy | ||
working-directory: ./outputdir/ | ||
run: sf builds deploy --buildfile manifest/buildfile.json --client-id ${{ vars.CLIENT_ID }} --instance-url ${{ vars.INSTANCE_URL }} --username ${{ vars.USERNAME }} --jwt-key-file server.key |