Skip to content

Commit

Permalink
Add intro
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbutler committed Aug 5, 2024
1 parent 1110f41 commit 6cbef18
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/data/release-notes-issue-intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This issue is automatically updated with a preview of the release notes for the upcoming Fluid Framework release.

---
33 changes: 23 additions & 10 deletions .github/workflows/release-notes-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
inputs:
issueNumber:
description: 'Issue number to update'
default: 26
default: 22101
required: true

permissions:
Expand All @@ -22,13 +22,13 @@ jobs:
name: Update release notes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v4
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
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # ratchet:actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: "pnpm"
Expand Down Expand Up @@ -74,16 +74,29 @@ jobs:
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: Read issue intro file
id: intro
uses: juliangruber/read-file-action@v1
with:
path: ${{ github.workspace }}/.github/workflows/data/release-notes-issue-intro.md

- name: Update issue body
- name: Replace issue body with release notes
uses: julien-deramond/update-issue-body@v1
with:
issue-number: ${{ steps.issueNum.outputs.ISSUE }}
body: ${{ steps.relNotes.outputs.content }}
edit-mode: replace

- name: Prepend issue intro
uses: julien-deramond/update-issue-body@v1
with:
issue-number: ${{ steps.issueNum.outputs.ISSUE }}
body: ${{ steps.relNotes.outputs.content }}
edit-mode: prepend

- 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"

0 comments on commit 6cbef18

Please sign in to comment.