-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (49 loc) · 2.07 KB
/
Copy pathupdate-release-notes.yml
File metadata and controls
55 lines (49 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Update Release Notes
on:
schedule:
# Nightly (UTC) - Insider is released almost every night.
- cron: "20 3 * * *"
workflow_dispatch:
inputs:
mode:
description: "Which notes to update"
required: false
default: "both"
type: choice
options:
- both
- stable
- insider
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Prefer classic PAT (repo scope); fall back to fine-grained PAT; then default token.
token: ${{ secrets.GH_CLASSIC_TOKEN || secrets.GH_PAT_TOKEN || github.token }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Generate update markdown
env:
# Used by scripts/generate-update-notes.mjs for GitHub API calls (rate limiting, etc.)
GITHUB_TOKEN: ${{ secrets.GH_CLASSIC_TOKEN || secrets.GH_PAT_TOKEN || github.token }}
run: node scripts/generate-update-notes.mjs --mode "${{ inputs.mode || 'both' }}"
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
# GITHUB_TOKEN PR creation can be blocked by repo/org settings.
# Use a PAT to allow PR creation.
token: ${{ secrets.GH_CLASSIC_TOKEN || secrets.GH_PAT_TOKEN || github.token }}
commit-message: "chore(updates): refresh release notes"
title: "chore(updates): refresh release notes"
body: "Automated update of content/updates from desktop-app GitHub releases."
branch: "automation/update-release-notes"
delete-branch: true
labels: "automation"