From 8701aab043c92c8032676187868068d81779bed1 Mon Sep 17 00:00:00 2001 From: Raj Narayan Gupta <42234411+rajguptaH@users.noreply.github.com> Date: Mon, 25 Sep 2023 23:28:27 +0530 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 748550b..0858095 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '6.0' # Adjust the version as needed + dotnet-version: '6.0' # Adjust the version as needed # \--source-bundle S3Bucket="elasticbeanstalk-$AWS_REGION",S3Key=$GITHUB_SHA.zip - name: Build .NET Core Project run: dotnet build WebApiExample/WebApiExample/WebApiCrud.csproj --configuration Release @@ -27,8 +27,13 @@ jobs: aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws configure set region ${{ secrets.AWS_REGION }} + aws elasticbeanstalk create-application-version \ + --application-name ${{ secrets.AWS_ELASTIC_BEANSTALK_APP_NAME }} \ + --version-label $GITHUB_SHA + aws elasticbeanstalk update-environment \ --application-name ${{ secrets.AWS_ELASTIC_BEANSTALK_APP_NAME }} \ - --environment-name ${{ secrets.AWS_ELASTIC_BEANSTALK_ENV_NAME }} + --environment-name ${{ secrets.AWS_ELASTIC_BEANSTALK_ENV_NAME }} \ + --version-label $GITHUB_SHA env: DOTNET_ROOT: ${{ secrets.DOTNET_ROOT }}