Skip to content

Update Release Notes #14

Update Release Notes

Update Release Notes #14

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"