diff --git a/.github/workflows/release-embedding-sdk.yml b/.github/workflows/release-embedding-sdk.yml index 0ce91b47b007ed34401c9ba4e081e54eb970e1c0..7358e7aea3970e633e1550003d19c60429e1ebe8 100644 --- a/.github/workflows/release-embedding-sdk.yml +++ b/.github/workflows/release-embedding-sdk.yml @@ -35,7 +35,7 @@ jobs: - name: check tags run: | - if [ $(git tag -l | grep $tag) ] + if [ $(git tag -l | grep $tag$) ] then echo "::error::Tag '${{ env.tag }}' already exists. If you expect to run this workflow with the same tag, please remove the tag first and rerun this workflow again." exit 1 @@ -168,8 +168,8 @@ jobs: - name: Setup git user run: | - git config --global user.email "metabase-bot@metabase.com" - git config --global user.name "Metabase bot" + git config --global user.email "github-automation@metabase.com" + git config --global user.name "Metabase Automation" # TODO: Remove this step after the build utils script is merged to master - name: Download release utils script @@ -196,12 +196,6 @@ jobs: run: | mv CHANGELOG.md ./enterprise/frontend/src/embedding-sdk/CHANGELOG.md - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ secrets.METABASE_BOT_APP_ID }} - private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }} - - name: Create a PR updating readme + published version, and changelog run: | git checkout -b update-sdk-version-${{ inputs.sdk_version }} @@ -211,7 +205,18 @@ jobs: --assignee "${GITHUB_ACTOR}"\ --title "Update SDK version to ${{ inputs.sdk_version }}"\ --body "Update Readme version references and published npm package version to ${{ inputs.sdk_version }}" - gh pr edit --add-reviewer @metabase/embedding + env: + GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }} + + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.METABASE_BOT_APP_ID }} + private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }} + + - name: Edit PR adding useful information + run: | + gh pr edit --add-reviewer @metabase/embedding --add-label no-backport env: GH_TOKEN: ${{ steps.app-token.outputs.token }} @@ -239,11 +244,7 @@ jobs: with: ref: ${{ inputs.git_ref }} - - name: Setup git user - run: | - git config --global user.email "metabase-bot@metabase.com" - git config --global user.name "Metabase bot" - + # Lightweight tags don't need committer name and email - name: Create a new git tag run: | git tag ${{ env.tag }}