Skip to content

WIP: Test CI

WIP: Test CI #120

Workflow file for this run

# A workflow to validate at least one release-note category is selected
name: release-note
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
- unlabeled
# post-merge job requires write access to add a label and post a comment.
pull_request_target:
types:
- closed
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
validate-labeled:
if: github.event.pull_request.draft == false && github.event.action != 'closed'
runs-on: ubuntu-slim
permissions:
pull-requests: read # validateLabeled looks at PR's labels
timeout-minutes: 5
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github
- name: validate-labeled
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
// https://github.com/actions/github-script#run-a-separate-file
const script = require("./.github/workflows/release-note.js");
await script.validateLabeled({ core, context, github });
post-merge:
if: github.event.action == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-slim
timeout-minutes: 5
permissions:
pull-requests: write # postMerge labels PRs
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: |
.github
- name: post-merge
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
// https://github.com/actions/github-script#run-a-separate-file
const script = require("./.github/workflows/release-note.js");
await script.postMerge({ context, github });