File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 9
9
type : boolean
10
10
required : false
11
11
default : false
12
+ force :
13
+ description : " Allow overwriting an existing release, or making a release with an incorrect date"
14
+ type : boolean
15
+ required : false
16
+ default : false
12
17
13
18
permissions : write-all
14
19
30
35
run : |
31
36
rm -f .covignore .mailmap .codespellrc Dockerfile
32
37
rm -rf etc scripts
38
+ - name : Extract the latest CHANGELOG entry to use as the GitHub release text
39
+ run : |
40
+ # Extract the part of CHANGELOG that is relevant to this release
41
+ LINES=`grep -n "## Version " CHANGELOG.md | head -2 | cut -d':' -f1`
42
+
43
+ # Find the line number where the relevant section starts
44
+ # (Increment by 1 if that first line is empty)
45
+ START=`echo $LINES | cut -d' ' -f1`;
46
+ START=$((START + 1))
47
+ if [ "`sed \"${START}q;d\" CHANGELOG.md`" == "" ]; then
48
+ START=$(( START + 1 ));
49
+ fi
50
+
51
+ # Find the line number where the relevant section ends
52
+ # (Decrement by 1 if that last line is empty)
53
+ STOP=`echo $LINES | cut -d' ' -f2`;
54
+ STOP=$((STOP - 1))
55
+ if [ "`sed \"${STOP}q;d\" CHANGELOG.md`" == "" ]; then
56
+ STOP=$(( STOP - 1 ));
57
+ fi
58
+
59
+ # Store the potentially multi-line text in the BODY environment so
60
+ # that we can pass it to the release-pkg action as an input
61
+ {
62
+ echo 'BODY<<EOF'
63
+ sed -n "${START},${STOP}p" CHANGELOG.md
64
+ echo EOF
65
+ } >> "$GITHUB_ENV"
66
+
33
67
- uses : gap-actions/release-pkg@v1
34
68
with :
35
69
dry-run : ${{ inputs.dry-run }}
70
+ force : ${{ inputs.force }}
71
+ body-text : ${{ env.BODY }}
36
72
- uses : gap-actions/update-gh-pages@v1
37
73
if : ${{ !inputs.dry-run }}
38
74
with :
You can’t perform that action at this time.
0 commit comments