ci: make release faster and restartable

This commit is contained in:
Nicolò Boschi 2025-12-18 13:10:46 +01:00
parent 9474f950f2
commit 67fc532c43
3 changed files with 28 additions and 10 deletions

View file

@ -102,7 +102,18 @@ jobs:
- name: Publish to npm
working-directory: ./hindsight-clients/typescript
run: npm publish --access public
run: |
set +e
OUTPUT=$(npm publish --access public 2>&1)
EXIT_CODE=$?
echo "$OUTPUT"
if [ $EXIT_CODE -ne 0 ]; then
if echo "$OUTPUT" | grep -q "cannot publish over"; then
echo "Package version already published, skipping..."
exit 0
fi
exit $EXIT_CODE
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@ -150,7 +161,18 @@ jobs:
- name: Publish to npm
working-directory: ./hindsight-control-plane
run: npm publish --access public
run: |
set +e
OUTPUT=$(npm publish --access public 2>&1)
EXIT_CODE=$?
echo "$OUTPUT"
if [ $EXIT_CODE -ne 0 ]; then
if echo "$OUTPUT" | grep -q "cannot publish over"; then
echo "Package version already published, skipping..."
exit 0
fi
exit $EXIT_CODE
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@ -297,8 +319,6 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
release-helm-chart:
runs-on: ubuntu-latest

View file

@ -207,8 +207,6 @@ jobs:
target: ${{ matrix.target }}
push: false
load: false
cache-from: type=gha
cache-to: type=gha,mode=max
# TODO: Re-enable smoke test when disk space issue is resolved
# - name: Smoke test - verify container starts

View file

@ -1141,7 +1141,7 @@ wheels = [
[[package]]
name = "hindsight-all"
version = "0.1.8"
version = "0.1.9"
source = { editable = "hindsight" }
dependencies = [
{ name = "hindsight-api" },
@ -1165,7 +1165,7 @@ provides-extras = ["test"]
[[package]]
name = "hindsight-api"
version = "0.1.8"
version = "0.1.9"
source = { editable = "hindsight-api" }
dependencies = [
{ name = "alembic" },
@ -1269,7 +1269,7 @@ dev = [
[[package]]
name = "hindsight-client"
version = "0.1.8"
version = "0.1.9"
source = { editable = "hindsight-clients/python" }
dependencies = [
{ name = "aiohttp" },
@ -1303,7 +1303,7 @@ provides-extras = ["test"]
[[package]]
name = "hindsight-dev"
version = "0.1.8"
version = "0.1.9"
source = { editable = "hindsight-dev" }
dependencies = [
{ name = "hindsight-api" },