From df9d0fc53658ed56da65df3c30198f2c0b9d31a9 Mon Sep 17 00:00:00 2001 From: Lakshan Sivagnanasothy Date: Thu, 21 Apr 2022 11:43:26 +0530 Subject: [PATCH] Add workflow to release to staging and dev --- .github/workflows/dev-stg-release.yml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/dev-stg-release.yml diff --git a/.github/workflows/dev-stg-release.yml b/.github/workflows/dev-stg-release.yml new file mode 100644 index 0000000..2aab871 --- /dev/null +++ b/.github/workflows/dev-stg-release.yml @@ -0,0 +1,43 @@ +name: Dev/Staging BCentral Release + +on: + workflow_dispatch: + inputs: + bal_central_environment: + description: Ballerina Central Environment + type: choice + options: + - STAGE + - DEV + required: true + +jobs: + release: + runs-on: ubuntu-latest + env: + BALLERINA_${{ github.event.inputs.bal_central_environment }}_CENTRAL: true + steps: + - uses: actions/checkout@v2 + - name: Ballerina Build + uses: ballerina-platform/ballerina-action/@master + with: + args: pack ./s3 + + - name: Push to Staging + if: github.event.inputs.bal_central_environment == 'STAGE' + uses: ballerina-platform/ballerina-action/@master + with: + args: push + env: + WORKING_DIR: ./s3 + BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }} + + - name: Push to Dev + if: github.event.inputs.bal_central_environment == 'DEV' + uses: ballerina-platform/ballerina-action/@master + with: + args: push + env: + WORKING_DIR: ./s3 + BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} +