File tree Expand file tree Collapse file tree 6 files changed +36
-30
lines changed Expand file tree Collapse file tree 6 files changed +36
-30
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ name: Update spec on merge
5
5
on :
6
6
push :
7
7
branches :
8
- - draft-v6
9
- - draft-v7
8
+ - standard-v6
9
+ - standard-v7
10
+ - draft-v8
10
11
workflow_dispatch :
11
12
inputs :
12
13
reason :
63
64
uses :
peter-evans/[email protected]
64
65
if : ${{ steps.renumber-sections.outputs.status }} == 'success' && ${{ steps.update-grammar.outputs.status }} == 'success'
65
66
with :
66
- title : ' Automated Section renumber and grammar extraction'
67
- body : ' renumber sections. Add grammar'
67
+ title : " Automated Section renumber and grammar extraction"
68
+ body : " renumber sections. Add grammar"
69
+
70
+ - name : Run converter
71
+ id : run-converter
72
+ run : |
73
+ cd tools
74
+ ./run-converter.sh
75
+ shell : bash
76
+
77
+ - name : Upload Word artifact
78
+ uses : actions/upload-artifact@v3
79
+ if : >
80
+ ${{ steps.renumber-sections.outputs.status }} == 'success' &&
81
+ ${{ steps.update-grammar.outputs.status }} == 'success' &&
82
+ ${{ steps.run-converter.outputs.status }} == 'success'
83
+ with :
84
+ name : standard.docx
85
+ path : ./tools/tmp/standard.docx
86
+ retention-days : 15
Original file line number Diff line number Diff line change @@ -21,3 +21,11 @@ dotnet run --project $CONVERTER_PROJECT -- \
21
21
$SPEC_DIRECTORY /* .md $TEMPLATE \
22
22
-o $OUTPUT_DIRECTORY /standard.docx
23
23
24
+ if [ " $? " -eq " 0" ]
25
+ then
26
+ # Success: Write key/value for GitHub action to read:
27
+ echo " status=success" >> $GITHUB_OUTPUT
28
+ else
29
+ # Failed: report the error to the GitHub action:
30
+ echo " status=failed" >> $GITHUB_OUTPUT
31
+ fi
Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ dotnet run --project $PROJECT -- $1
14
14
if [ " $? " -eq " 0" ]
15
15
then
16
16
# Success: Write key/value for GitHub action to read:
17
- echo " ::set-output name= status:: success"
17
+ echo " status= success" >> $GITHUB_OUTPUT
18
18
else
19
19
# Failed: report the error to the GitHub action:
20
- echo " ::set-output name= status:: failed"
20
+ echo " status= failed" >> $GITHUB_OUTPUT
21
21
fi
Original file line number Diff line number Diff line change 17
17
rm -rf smarten
18
18
19
19
# I think always success, but echo the success output anyway:
20
- echo " ::set-output name= status:: success"
20
+ echo " status= success" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -49,4 +49,4 @@ echo Insert EOF Stuff
49
49
cat $GRAMMAR_PROJECT /grammar-eof-insert.md >> $OUTPUT_FILE
50
50
51
51
# I think always success, but echo the success output anyway:
52
- echo " ::set-output name= status:: success"
52
+ echo " status= success" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -3,28 +3,7 @@ set -eu -o pipefail
3
3
4
4
declare -r SPEC_DIRECTORY=../standard
5
5
6
- declare -a SPEC_FILES=(
7
- " lexical-structure.md"
8
- " basic-concepts.md"
9
- " types.md"
10
- " variables.md"
11
- " conversions.md"
12
- " patterns.md"
13
- " expressions.md"
14
- " statements.md"
15
- " namespaces.md"
16
- " classes.md"
17
- " structs.md"
18
- " arrays.md"
19
- " interfaces.md"
20
- " enums.md"
21
- " delegates.md"
22
- " exceptions.md"
23
- " attributes.md"
24
- " unsafe-code.md"
25
- )
26
-
27
- dotnet csharpgrammar ../test-grammar CSharp ../standard -m ../.github/workflows/dependencies/ReplaceAndAdd.md
6
+ dotnet csharpgrammar ../test-grammar CSharp $SPEC_DIRECTORY -m ../.github/workflows/dependencies/ReplaceAndAdd.md
28
7
29
8
# Now, validate it:
30
9
curl -H " Accept: application/zip" https://repo1.maven.org/maven2/com/tunnelvisionlabs/antlr4/4.9.0/antlr4-4.9.0-complete.jar -o antlr-4.9.0-complete.jar
You can’t perform that action at this time.
0 commit comments