Skip to content
Snippets Groups Projects
Unverified Commit ac6bb7b4 authored by Mahatthana (Kelvin) Nomsawadi's avatar Mahatthana (Kelvin) Nomsawadi Committed by GitHub
Browse files

Followed-up tasks for changelog generation (#43656)

* Check git tag for an exact match

* Set npm publish to dry run, so I can test

* Uses new github automation account for creating a PR

* Remove unnecessary step

* Automatically set `no-backport` on the SDK doc version bump PR

* Fix step to edit PR with correct permission

* Remove npm dry run after finished testing
parent e430b776
No related branches found
No related tags found
No related merge requests found
......@@ -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 }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment