Update release notes issue #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Update release notes issue" | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- ".changeset/**" | |
# Allow manually triggering this workflow from the web UI | |
workflow_dispatch: | |
inputs: | |
issueNumber: | |
description: 'Issue number to update' | |
default: 26 | |
required: true | |
permissions: | |
issues: write | |
jobs: | |
create-issue: | |
name: Update release notes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
persist-credentials: false | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # ratchet:pnpm/action-setup@v4 | |
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # ratchet:actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: "pnpm" | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Set issue number | |
id: issueNum | |
env: | |
ISSUE_VAL: ${{ github.event_name == 'push' && 'secrets.RELEASE_NOTES_ISSUE' || github.event.inputs.issueNumber }} | |
run: | | |
echo "ISSUE=$ISSUE_VAL" >> "$GITHUB_OUTPUT" | |
- name: Set version output variable | |
id: setVersion | |
run: | | |
echo "VERSION=$(jq -r '.version' package.json)" >> "$GITHUB_OUTPUT" | |
- name: Install Fluid build tools | |
continue-on-error: true | |
run: | | |
cd build-tools | |
pnpm install --frozen-lockfile | |
pnpm run build:compile | |
# We want flub available to call, so we run npm link in the build-cli package, which creates shims that are avilable on the PATH | |
# Use npm link instead of pnpm link because it handles bins better | |
cd packages/build-cli | |
npm link | |
- name: Check build-tools installation | |
run: | | |
# Info for debugging | |
which flub | |
flub --help | |
flub commands | |
- name: Generate release notes file | |
run: | | |
flub generate releaseNotes -g client -t minor --includeUnknown --out RELEASE_NOTES.md -v | |
- name: Read release notes file | |
id: relNotes | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./RELEASE_NOTES.md | |
- name: Update issue title | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
NEW_TITLE="Upcoming Release: FluidFramework v${{ steps.setVersion.outputs.VERSION }}" | |
gh issue edit ${{ steps.issueNum.outputs.ISSUE }} --title "$NEW_TITLE" | |
- name: Update issue body | |
uses: julien-deramond/update-issue-body@v1 | |
with: | |
issue-number: ${{ steps.issueNum.outputs.ISSUE }} | |
body: ${{ steps.relNotes.outputs.content }} | |
edit-mode: replace |