make deploy to github action work for non-releases

develop
Myk Taylor 2023-08-18 23:34:37 -07:00
parent 833a54da05
commit 592990f1d3
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

@ -3,7 +3,7 @@ name: Deploy to GitHub
on: on:
push: push:
tags: tags:
- '*-r[0-9]+' - '*-r*'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
@ -39,10 +39,12 @@ jobs:
- name: Generate release text - name: Generate release text
run: | run: |
python docs/gen_changelog.py -a python docs/gen_changelog.py -a
CHANGELOG_FILE=docs/changelogs/${{ steps.gettag.outputs.name }}-github.txt
if ! test -f $CHANGELOG_FILE; then CHANGELOG_FILE=docs/changelogs/future-github.txt; fi
TOKEN_LINE=$(grep -Fhne '%RELEASE_NOTES%' .github/release_template.md | sed 's/:.*//') TOKEN_LINE=$(grep -Fhne '%RELEASE_NOTES%' .github/release_template.md | sed 's/:.*//')
head -n $((TOKEN_LINE - 1)) .github/release_template.md > release_body.md head -n $((TOKEN_LINE - 1)) .github/release_template.md > release_body.md
CHANGELOG_LINES=$(wc -l <docs/changelogs/${{ steps.gettag.outputs.name }}-github.txt) CHANGELOG_LINES=$(wc -l <$CHANGELOG_FILE)
tail -n $((CHANGELOG_LINES - 3)) docs/changelogs/${{ steps.gettag.outputs.name }}-github.txt >> release_body.md tail -n $((CHANGELOG_LINES - 3)) $CHANGELOG_FILE >> release_body.md
tail -n 2 .github/release_template.md >> release_body.md tail -n 2 .github/release_template.md >> release_body.md
cat release_body.md cat release_body.md
- name: Stage release - name: Stage release

@ -3,7 +3,7 @@ name: Deploy to Steam
on: on:
push: push:
tags: tags:
- '*' - '*-r*'
workflow_dispatch: workflow_dispatch:
inputs: inputs: