Skip to content

Commit aaab053

Browse files
committed
ci: fail soldeer publish step on missing token or push error
1 parent f573ac0 commit aaab053

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,17 @@ jobs:
7878
env:
7979
SOLDEER_API_TOKEN: ${{ secrets.SOLDEER_API_TOKEN }}
8080
run: |
81+
if [ -z "$SOLDEER_API_TOKEN" ]; then
82+
echo "::error::SOLDEER_API_TOKEN secret is not set"
83+
exit 1
84+
fi
8185
VERSION=${{ needs.release.outputs.new_release_version }}
8286
echo "Publishing uint-quantization-lib~$VERSION to Soldeer..."
83-
soldeer push uint-quantization-lib~"$VERSION"
87+
soldeer push uint-quantization-lib~"$VERSION" 2>&1 | tee /tmp/soldeer-output.log
88+
if grep -q "error during" /tmp/soldeer-output.log; then
89+
echo "::error::Soldeer push failed"
90+
exit 1
91+
fi
8492
8593
- name: Tag last Soldeer publish
8694
run: |

0 commit comments

Comments
 (0)