-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathcreate-release.sh
More file actions
31 lines (25 loc) · 981 Bytes
/
create-release.sh
File metadata and controls
31 lines (25 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -euo pipefail
# Config
REPO="helios-network/helios-core" # ex: "mon-org/mon-repo"
TAG="v0.0.271"
TITLE="Release ${TAG}"
NOTES="Release of the Helios Core"
BINARY_PATH="/Users/jeremyguyet/go/bin/heliades" # chemin vers ton binaire
PRERELEASE=false
# Optionnel: target commit (branch)
TARGET="main"
# Vérifications
command -v gh >/dev/null || { echo "gh CLI introuvable. Installe https://cli.github.com/"; exit 1; }
[ -f "$BINARY_PATH" ] || { echo "Binaire introuvable: $BINARY_PATH"; exit 1; }
# Crée la release et upload l'asset
echo "Création de la release $TAG sur $REPO..."
if $PRERELEASE; then preflag="--prerelease"; else preflag=""; fi
gh release create "$TAG" "$BINARY_PATH" \
--repo "$REPO" \
--title "$TITLE" \
--notes "$NOTES" \
--target "$TARGET" $preflag
echo "Release créée et binaire uploadé."
sha256sum "$BINARY_PATH" | awk '{print $1}' > "${BINARY_PATH}.sha256"
echo "SHA256 écrit dans ${BINARY_PATH}.sha256"