fangorn/ex_git_objectstore
public
ref:main
release cancelled
Command:
set -e
apt-get update && apt-get install -y --no-install-recommends git jq
git config --global --add safe.directory /workspace
export MIX_HOME=/workspace/.mix
# Only release from main branch
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH" != "main" ]; then
echo "Skipping release: not on main (on $BRANCH)"
exit 0
fi
# Compute CalVer version
VERSION=$(bash ci/release.sh)
echo "Releasing version: $VERSION"
# Idempotency: skip if this version tag already exists
if git tag -l "$VERSION" | grep -q .; then
echo "Tag $VERSION already exists, skipping release"
exit 0
fi
# Build with version
export VERSION
mix compile
# Generate changelog from commits since last tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD)
CHANGELOG=$(git log --oneline "$LAST_TAG"..HEAD)
# Generate hex package
mix hex.build
HEX_TAR=$(ls ex_git_objectstore-*.tar 2>/dev/null | head -1 || true)
# Generate docs
mix docs
tar czf ex_git_objectstore-${VERSION}-docs.tar.gz doc/
# Create Anvil release
anvil release create \
--tag "$VERSION" \
--title "ExGitObjectstore $VERSION" \
--body "$CHANGELOG"
# Tag and push
git tag "$VERSION"
git push origin "$VERSION"
echo "Released $VERSION"
Started: -
Completed: Apr 09, 2026 at 13:23 UTC
Duration: -
Build Output
No output yet.