-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add release vscode workflow; fix changelog #10719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9268e58
cad089b
e1ff646
dd4bf4c
62576e0
8ebc958
72d0551
967d07b
be2a487
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Release VS Code Extension | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
hlshen marked this conversation as resolved.
|
||
| pull-requests: read | ||
| issues: read | ||
|
|
||
| jobs: | ||
| release: | ||
| if: | | ||
| github.event.issue.pull_request && | ||
|
joehan marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also add an author check here. |
||
| startsWith(github.event.comment.body, '/run-release') && | ||
| (github.event.comment.author_association == 'OWNER' || | ||
| github.event.comment.author_association == 'MEMBER' || | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets also assert that the pr aiuthor is an owner or maintainer as well. I don't think we'd ever run this on a contributor branch, but we should encode that into the rule |
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Trigger Kokoro via API | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| COMMENT_BODY: ${{ github.event.comment.body }} | ||
| run: | | ||
| PR_NUM="${{ github.event.issue.number }}" | ||
|
morganchen12 marked this conversation as resolved.
|
||
| echo "Fetching SHA for PR $PR_NUM..." | ||
| SHA=$(gh pr view "$PR_NUM" --json headRefOid -q .headRefOid) | ||
| echo "PR Head SHA is $SHA" | ||
|
|
||
| if [[ "$COMMENT_BODY" == *"--build-only"* ]]; then | ||
| TARGET_BRANCH="vscode-release-trigger-build-only" | ||
| else | ||
| TARGET_BRANCH="vscode-release-trigger" | ||
|
Comment on lines
+32
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given these are going to be origins for release artifacts, you should work with Joe to set up branch protections for these branches. |
||
| fi | ||
| echo "Target branch is $TARGET_BRANCH" | ||
|
|
||
| # Try to update the branch ref (force-push equivalent via API) | ||
| if gh api -X PATCH "/repos/${{ github.repository }}/git/refs/heads/$TARGET_BRANCH" \ | ||
| -f sha="$SHA" -f force=true >/dev/null 2>&1; then | ||
| echo "Successfully updated ref refs/heads/$TARGET_BRANCH to $SHA" | ||
| else | ||
| echo "Ref refs/heads/$TARGET_BRANCH not found. Creating it..." | ||
| gh api -X POST "/repos/${{ github.repository }}/git/refs" \ | ||
| -f ref="refs/heads/$TARGET_BRANCH" -f sha="$SHA" >/dev/null | ||
| echo "Successfully created ref refs/heads/$TARGET_BRANCH at $SHA" | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| ## NEXT | ||
|
|
||
| ## 2.4.1 | ||
|
|
||
| - Update internal `firebase-tools` dependency to 15.21.0 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.