diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 000000000000..0a9a40acae59 --- /dev/null +++ b/.github/release.yaml @@ -0,0 +1,44 @@ +# Part of the Carbon Language project, under the Apache License v2.0 with LLVM +# Exceptions. See /LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +# Provide the configuration and categorization for generated release notes. + +changelog: + exclude: + labels: + - ignore-for-release + + categories: + - title: 'Proposals accepted and merged :scroll:' + labels: + - proposal + exclude.labels: + - bot + - title: 'Toolchain and implementation changes :hammer_and_wrench:' + labels: + - toolchain + - explorer + exclude.labels: + - bot + - title: 'Documentation changes :memo:' + labels: + - documentation + exclude.labels: + - bot + - title: 'Utilities :triangular_ruler:' + labels: + - utilities + exclude.labels: + - bot + - title: 'Infrastructure changes :building_construction:' + labels: + - infrastructure + exclude.labels: + - bot + - title: 'Automated robot PRs :robot:' + labels: + - bot + - title: 'Other changes' + labels: + - '*' diff --git a/.github/workflows/label_prs.yaml b/.github/workflows/label_prs.yaml index d543065fddac..524a38a1b56c 100644 --- a/.github/workflows/label_prs.yaml +++ b/.github/workflows/label_prs.yaml @@ -26,20 +26,48 @@ jobs: documentation: - '*.md' - 'docs/**' + - 'examples/**' + - 'third_party/examples/**' + explorer: - 'explorer/**' + - 'installers/**' + infrastructure: - - 'BUILD' - - 'WORKSPACE' + - '*.bzl' + - '*.cfg' + - '*.toml' - '.*' - '.*/**' + - 'BUILD' + - 'MODULE.*' + - 'WORKSPACE' - 'bazel/**' + - 'github_tools/**' + - 'proposal/scripts/**' - 'scripts/**' + + # Here we only want the `proposal` label when a *new* file is added + # directly in this directory. We use `added` and a single level glob + # to achieve that. + proposal: + - added: 'proposals/*' + + # We include common, shared code into the toolchain label for + # convenience. Essentially, this is everything we intend to ship as + # part of the reference implementation of the language. toolchain: + - 'common/**' + - 'core/**' + - 'language_server/**' + - 'testing/**' - 'toolchain/**' + utilities: + - 'utils/**' + - id: documentation - if: steps.filter.outputs.docs == 'true' + if: steps.filter.outputs.documentation == 'true' run: | gh pr edit "${PR}" --add-label "documentation" env: @@ -55,13 +83,21 @@ jobs: PR: ${{ github.event.pull_request.html_url }} - id: infrastructure - if: steps.filter.outputs.docs == 'true' + if: steps.filter.outputs.infrastructure == 'true' run: | gh pr edit "${PR}" --add-label "infrastructure" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR: ${{ github.event.pull_request.html_url }} + - id: proposal + if: steps.filter.outputs.proposal == 'true' + run: | + gh pr edit "${PR}" --add-label "proposal" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ github.event.pull_request.html_url }} + - id: toolchain if: steps.filter.outputs.toolchain == 'true' run: | @@ -69,3 +105,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR: ${{ github.event.pull_request.html_url }} + + - id: utilities + if: steps.filter.outputs.utilities == 'true' + run: | + gh pr edit "${PR}" --add-label "utilities" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ github.event.pull_request.html_url }} + + # Note that this is not a path-based label, but an *author* based label, + # and it applies orthogonally to the others. + - id: automated + if: + contains(fromJSON('["CarbonInfraBot", "dependabot"]'), + github.event.pull_request.user.login) + run: | + gh pr edit "${PR}" --add-label "automated" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/nightly-release.yaml b/.github/workflows/nightly-release.yaml index 80eb4d0ec3a7..27950b603886 100644 --- a/.github/workflows/nightly-release.yaml +++ b/.github/workflows/nightly-release.yaml @@ -88,7 +88,7 @@ jobs: run: | gh release create \ --title "Nightly build ${{ env.nightly_date }}" \ - --notes 'A nightly development build of Carbon.' \ + --generate-notes \ --prerelease \ v${{ env.release_version }} \ "bazel-bin/toolchain/install/carbon_toolchain-${{ env.release_version }}.tar.gz"