From 4649bdb7ebc297d188d3872ebdc02b38690afc19 Mon Sep 17 00:00:00 2001 From: Github Date: Tue, 11 Jun 2024 17:07:39 -0600 Subject: [PATCH 1/2] Use gh cli for production deploy --- .github/workflows/deploy.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 63148f9e4eb5..a792d069151b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: with: ref: staging token: ${{ secrets.OS_BOTIFY_TOKEN }} - + - name: Setup git for OSBotify uses: ./.github/actions/composite/setupGitForOSBotifyApp id: setupGitForOSBotify @@ -65,9 +65,6 @@ jobs: PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }} - name: 🚀 Create release to trigger production deploy 🚀 - uses: softprops/action-gh-release@affa18ef97bc9db20076945705aba8c516139abd - with: - tag_name: ${{ env.PRODUCTION_VERSION }} - body: ${{ steps.getReleaseBody.outputs.RELEASE_BODY }} + run: gh release create ${{ env.PRODUCTION_VERSION }} --notes ${{ steps.getReleaseBody.outputs.RELEASE_BODY }} env: GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }} From 1ead9e7464cf4ae991801e7f3c7d40649af8f4de Mon Sep 17 00:00:00 2001 From: Github Date: Wed, 12 Jun 2024 10:16:16 -0600 Subject: [PATCH 2/2] Adjust assertions and mocks to make tests pass --- workflow_tests/assertions/deployAssertions.ts | 5 +---- workflow_tests/mocks/deployMocks.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/workflow_tests/assertions/deployAssertions.ts b/workflow_tests/assertions/deployAssertions.ts index c5106ab6d945..dc3cd7f18f4d 100644 --- a/workflow_tests/assertions/deployAssertions.ts +++ b/workflow_tests/assertions/deployAssertions.ts @@ -49,10 +49,7 @@ function assertDeployProductionJobExecuted(workflowResult: Step[], didExecute = null, 'DEPLOY_PRODUCTION', 'Creating release to trigger production deploy', - [ - {key: 'tag_name', value: '1.2.3'}, - {key: 'body', value: 'Release body'}, - ], + [], [{key: 'GITHUB_TOKEN', value: 'os_botify_api_token'}], ), ] as const; diff --git a/workflow_tests/mocks/deployMocks.ts b/workflow_tests/mocks/deployMocks.ts index 5c0d79235d89..2fda1efe8e78 100644 --- a/workflow_tests/mocks/deployMocks.ts +++ b/workflow_tests/mocks/deployMocks.ts @@ -44,7 +44,7 @@ const DEPLOY_PRODUCTION__CREATE_RELEASE__STEP_MOCK = createMockStep( '🚀 Create release to trigger production deploy 🚀', 'Creating release to trigger production deploy', 'DEPLOY_PRODUCTION', - ['tag_name', 'body'], + [], ['GITHUB_TOKEN'], ); const DEPLOY_PRODUCTION_STEP_MOCKS = [