-
Notifications
You must be signed in to change notification settings - Fork 1.6k
58 lines (51 loc) · 2.13 KB
/
dispatch-create-whats-new-page.yml
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
56
57
58
name: Create What's New Page for TinaCMS or TinaCloud
on:
workflow_dispatch:
inputs:
project:
description: 'The project to create the Whats New page for.'
required: true
versionNumber:
description: 'The version of the project to create the Whats New page for.'
required: true
dateReleased:
description: 'The date the version was released.'
required: true
releaseNotes:
description: 'The release notes for the version.'
required: true
permissions:
contents: write
pull-requests: write
jobs:
create-whats-new-page:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create What's New Page
run: |
./scripts/create-whats-new-page.sh
env:
PROJECT_NAME: ${{ github.event.inputs.project }}
VERSION_NUMBER: ${{ github.event.inputs.versionNumber }}
DATE_RELEASED: ${{ github.event.inputs.dateReleased }}
RELEASE_NOTES: ${{ github.event.inputs.releaseNotes }}
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v7
with:
commit-message: Release Notes - Add ${{ github.event.inputs.project }} ${{ github.event.inputs.versionNumber }}
title: Release Notes - Add ${{ github.event.inputs.project }} ${{ github.event.inputs.versionNumber }}
body: |
This PR adds the release notes for ${{ github.event.inputs.project }} ${{ github.event.inputs.versionNumber }}.
This was created automatically by a GitHub Action - `.github/workflows/dispatch-create-whats-new-page.yml`
branch: releaseNotes/${{ github.event.inputs.project }}-${{ github.event.inputs.releaseNotes }}
# We only expect changes to these folders
add-paths: |
content/*
- name: Enable Auto-Merge
if: ${{ steps.create-pull-request.outputs.pull-request-number }}
run: gh pr merge -s --auto ${{ steps.create-pull-request.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}