From af3c8ddbbb260f0ff32cd198c22b0f2079338621 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 10 Feb 2025 09:31:15 -0800 Subject: [PATCH] update the publish workflow; add a post_summaries one --- .github/workflows/post_summaries.yaml | 17 +++++++++++++++++ .github/workflows/publish.yaml | 15 +++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/post_summaries.yaml diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/post_summaries.yaml new file mode 100644 index 000000000..31c1e5060 --- /dev/null +++ b/.github/workflows/post_summaries.yaml @@ -0,0 +1,17 @@ +name: Comment on the pull request + +on: + # Trigger this workflow after the Publish workflow completes. This workflow + # will have permissions to do things like create comments on the PR, even if + # the original workflow couldn't. + workflow_run: + workflows: + - Publish + types: + - completed + +jobs: + upload: + uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main + permissions: + pull-requests: write diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6706b071b..69b20b1b3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,18 +3,17 @@ name: Publish on: - # Trigger on pull requests that target the default branch. pull_request: - branches: [ master ] - types: [opened, synchronize, reopened, labeled, unlabeled] - # Also, trigger when tags are pushed to the repo. + branches: [master] push: - tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+*' ] + tags: ['[A-z]+-v[0-9]+.[0-9]+.[0-9]+*'] -# The script below will perform publishing checks (version checks, publishing -# dry run, ...) when run on a PR, and perform an actual pub publish when run as -# a result of a git tag event. jobs: publish: if: ${{ github.repository_owner == 'google' }} uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + permissions: + id-token: write + pull-requests: write + with: + write-comments: false