Print starcatcher release response to console if it fails

I guess we'll see at the next release whether I did this correctly.
This commit is contained in:
Tamás Bálint Misius 2021-11-08 15:31:07 +01:00
parent 858ba7cc93
commit 8c80dca91b
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
2 changed files with 10 additions and 3 deletions

7
.github/starcatcher-release.sh vendored Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
curl $1 > perform_release
if ! grep "Release complete" < perform_release > /dev/null; then
cat perform_release
exit 1
fi

View File

@ -131,7 +131,7 @@ jobs:
with:
path: powder${{ matrix.suffix }}
name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.machine_short }}-${{ matrix.platform_short }}-${{ matrix.toolset_short }}-${{ matrix.static_dynamic }}${{ matrix.suffix }}
starcatcher-upload:
starcatcher-publish:
runs-on: ubuntu-latest
needs: [build, release]
if: needs.release.outputs.can_publish == 'yes' && startsWith(github.ref, 'refs/tags/') # not a perfect match but get-type.py takes care of this in job build
@ -187,7 +187,7 @@ jobs:
STARCATCHER_PUBLISH_FILENAME: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.machine_short }}-${{ matrix.platform_short }}-${{ matrix.toolset_short }}-${{ matrix.static_dynamic }}${{ matrix.suffix }}
starcatcher-release:
runs-on: ubuntu-latest
needs: [starcatcher-upload, release]
needs: [starcatcher-publish, release]
if: needs.release.outputs.can_publish == 'yes' && startsWith(github.ref, 'refs/tags/') # not a perfect match but get-type.py takes care of this in job build
steps:
- uses: actions/checkout@v2
@ -196,4 +196,4 @@ jobs:
python-version: '3.8'
- id: get_type
run: python3 ./.github/get-type.py ${{ github.ref }}
- run: curl "https://starcatcher.us/TPT/perform-release.lua?mod=${{ steps.get_type.outputs.MOD_ID }}&type=${{ steps.get_type.outputs.TYPE }}&name=${{ steps.get_type.outputs.NAME }}&commit=${{ github.sha }}" | grep "Release complete"
- run: ./.github/starcatcher-publish.sh "https://starcatcher.us/TPT/perform-release.lua?mod=${{ steps.get_type.outputs.MOD_ID }}&type=${{ steps.get_type.outputs.TYPE }}&name=${{ steps.get_type.outputs.NAME }}&commit=${{ github.sha }}"