From 70b03d4d6388156fe3e2a699f1a7268e0a4d3eca Mon Sep 17 00:00:00 2001 From: Fabio de Agostini Schiozer <66429123+fabioschiozer@users.noreply.github.com> Date: Thu, 23 May 2024 22:29:42 -0300 Subject: [PATCH] Create packageRelease.yml --- .github/workflows/packageRelease.yml | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/packageRelease.yml diff --git a/.github/workflows/packageRelease.yml b/.github/workflows/packageRelease.yml new file mode 100644 index 0000000..721a47b --- /dev/null +++ b/.github/workflows/packageRelease.yml @@ -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/action-gh-release@v0.1.15 + env: + GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} + with: + tag_name: ${{ inputs.tag }} + files: ${{ github.event.repository.name }}-${{ inputs.tag }}.zip