diff --git a/.github/starcatcher-release.sh b/.github/starcatcher-release.sh new file mode 100755 index 000000000..92f7f69ca --- /dev/null +++ b/.github/starcatcher-release.sh @@ -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 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66c00fc96..ce81d4837 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 }}"