Skip to content

Commit 610943a

Browse files
authored
update the publish workflow; add a post_summaries one (#961)
- update the publish workflow to write its comment to a workflow file - add a post_summaries workflow - pull from the file and comment on the current PR This config will allow PRs from forks to still get feedback in the PR from the publish workflow.
1 parent 35a1bd6 commit 610943a

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

.github/workflows/post_summaries.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Comment on the pull request
2+
3+
on:
4+
# Trigger this workflow after the Publish workflow completes. This workflow
5+
# will have permissions to do things like create comments on the PR, even if
6+
# the original workflow couldn't.
7+
workflow_run:
8+
workflows:
9+
- Publish
10+
types:
11+
- completed
12+
13+
jobs:
14+
upload:
15+
uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main
16+
permissions:
17+
pull-requests: write

.github/workflows/publish.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
name: Publish
44

55
on:
6-
# Trigger on pull requests that target the default branch.
76
pull_request:
8-
branches: [ master ]
9-
types: [opened, synchronize, reopened, labeled, unlabeled]
10-
# Also, trigger when tags are pushed to the repo.
7+
branches: [master]
118
push:
12-
tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+*' ]
9+
tags: ['[A-z]+-v[0-9]+.[0-9]+.[0-9]+*']
1310

14-
# The script below will perform publishing checks (version checks, publishing
15-
# dry run, ...) when run on a PR, and perform an actual pub publish when run as
16-
# a result of a git tag event.
1711
jobs:
1812
publish:
1913
if: ${{ github.repository_owner == 'google' }}
2014
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
15+
permissions:
16+
id-token: write
17+
pull-requests: write
18+
with:
19+
write-comments: false

0 commit comments

Comments
 (0)