-
Notifications
You must be signed in to change notification settings - Fork 22
47 lines (41 loc) · 1.34 KB
/
create_release.yml
File metadata and controls
47 lines (41 loc) · 1.34 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
name: Create Versioned Docs Release
on:
workflow_dispatch:
inputs:
version:
description: "Version number (e.g. 2.0)"
required: true
type: string
permissions:
contents: write
pull-requests: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout trunk
uses: actions/checkout@v4
with:
ref: trunk
- name: Create release branch and run release script
working-directory: website
run: |
git checkout -b "release/docs-v${{ inputs.version }}"
./create-release.sh "${{ inputs.version }}"
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Add versioned docs for v${{ inputs.version }}"
git push origin "release/docs-v${{ inputs.version }}"
- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base trunk \
--head "release/docs-v${{ inputs.version }}" \
--title "Add versioned docs for v${{ inputs.version }}" \
--body "Creates versioned documentation snapshot for v${{ inputs.version }}." \
--label "area/docs"