-
Notifications
You must be signed in to change notification settings - Fork 86
80 lines (70 loc) · 1.99 KB
/
update-on-merge.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Update spec on merge
# Triggers the workflow on push to spec version branches.
# test-branch can be used to test this workflow.
on:
push:
branches:
- standard-v6
- standard-v7
- draft-v8
workflow_dispatch:
inputs:
reason:
description: 'The reason for running the workflow'
required: true
default: 'Manual run'
jobs:
create-pull-request-for-sections-and-grammar:
runs-on: windows-2022
permissions:
statuses: write
contents: write
pull-requests: write
env:
DOTNET_NOLOGO: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out our repo
uses: actions/checkout@v2
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15.0
- name: Smarten quotes
id: smarten-quote
run: |
cd tools
./run-smarten.sh
shell: bash
- name: Renumber sections
id: renumber-sections
run: |
cd tools
./run-section-renumber.sh
shell: bash
- name: Create pull request
uses: peter-evans/[email protected]
if: ${{ steps.renumber-sections.outputs.status }} == 'success' && ${{ steps.update-grammar.outputs.status }} == 'success'
with:
title: "Automated Section renumber and grammar extraction"
body: "renumber sections. Add grammar"
- name: Run converter
id: run-converter
run: |
cd tools
./run-converter.sh
shell: bash
- name: Upload Word artifact
uses: actions/upload-artifact@v3
if: >
${{ steps.renumber-sections.outputs.status }} == 'success' &&
${{ steps.update-grammar.outputs.status }} == 'success' &&
${{ steps.run-converter.outputs.status }} == 'success'
with:
name: standard.docx
path: ./tools/tmp/standard.docx
retention-days: 15