-
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
7cd60cd
commit 70b03d4
Showing
1 changed file
with
46 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,46 @@ | ||
name: Release - create release and artifact | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: Git ref from where the release/artifact is going to be downloaded and used as base for the deploy | ||
type: string | ||
required: true | ||
tag: | ||
description: Tag name to use to create the release | ||
type: string | ||
required: true | ||
environment: | ||
description: Environment that is going to be used to test the build before creating the release | ||
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: "Checkout source code" | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Setting git safe.directory | ||
run: git config --global --add safe.directory '*' | ||
|
||
- name: Archiving Repository | ||
run: git archive -o ${{ github.event.repository.name }}-${{ inputs.tag }}.zip HEAD | ||
|
||
- name: Upload Assets | ||
uses: softprops/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ inputs.tag }} | ||
files: ${{ github.event.repository.name }}-${{ inputs.tag }}.zip |