Răsfoiți Sursa

If release exists, append artifacts

Eric Helgeson 4 luni în urmă
părinte
comite
8716a8ec02
1 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 8 1
      .github/workflows/firmware_build.yml

+ 8 - 1
.github/workflows/firmware_build.yml

@@ -65,5 +65,12 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository == 'BlueSCSI/BlueSCSI-v2' }}
         run: |
+          set +e
           RELEASE=$(basename ${{github.ref}})
-          gh release create --repo ${GITHUB_REPOSITORY} -t $RELEASE $RELEASE BlueSCSI/distrib/*
+          gh release create --repo ${GITHUB_REPOSITORY} -t $RELEASE $RELEASE BlueSCSI/distrib/*
+          status=$?
+          set -e
+          if [ $status -ne 0 ]; then
+            gh release upload --repo ${GITHUB_REPOSITORY} $RELEASE BlueSCSI/distrib/*
+          fi
+