Package installer in releases and expand Renovate dependency updates
Release / release (push) Successful in 4m41s

This commit is contained in:
Sebastian Unterschütz committed 2026-10-27 18:38:54 +01:00
1 parent 66a49786c9
commit fa4509038b
8 files changed
+259 -16

No files matched your search

+33 -10
View File
@@ -11,6 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-go@v7
with:
@@ -33,14 +35,24 @@ jobs:
-o "$out" ./cmd/netssh
done
- name: Package installer
run: install -m 755 install.sh dist/install.sh
- name: Generate checksums
working-directory: dist
run: sha256sum netssh_* > checksums.txt
run: sha256sum netssh_* install.sh > checksums.txt
- name: Generate release notes
env:
RELEASE_TAG: ${{ github.ref_name }}
REPOSITORY_URL: ${{ github.server_url }}/${{ github.repository }}
run: bash scripts/release-notes.sh "$RELEASE_TAG" "$REPOSITORY_URL" > dist/release-notes.md
- name: Create release
id: create_release
env:
TAG: ${{ github.ref_name }}
run: |
TAG="${{ github.ref_name }}"
API="${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
AUTH="Authorization: token ${{ secrets.GITEA_TOKEN }}"
@@ -51,17 +63,28 @@ jobs:
curl -sf -X DELETE -H "$AUTH" "$API/releases/$EXISTING"
fi
# Serialize Markdown as JSON without hand-escaping quotes or newlines.
python3 - <<'PY_RELEASE' > dist/release.json
import json
import os
import sys
from pathlib import Path
tag = os.environ["TAG"]
json.dump({
"tag_name": tag,
"name": tag,
"body": Path("dist/release-notes.md").read_text(),
"draft": False,
"prerelease": False,
}, sys.stdout)
PY_RELEASE
RELEASE=$(curl -sf -X POST \
-H "$AUTH" \
-H "Content-Type: application/json" \
"$API/releases" \
-d "{
\"tag_name\": \"$TAG\",
\"name\": \"$TAG\",
\"body\": \"## Installation\n\n\`\`\`sh\ncurl -fsSL https://git.zb-server.de/Sebi/ssh-netbox-wrapper/raw/branch/main/install.sh | bash\n\`\`\`\",
\"draft\": false,
\"prerelease\": false
}")
--data-binary @dist/release.json)
RELEASE_ID=$(echo "$RELEASE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "release_id=$RELEASE_ID" >> "$GITHUB_OUTPUT"
@@ -69,7 +92,7 @@ jobs:
- name: Upload assets
run: |
RELEASE_ID="${{ steps.create_release.outputs.release_id }}"
for file in dist/netssh_* dist/checksums.txt; do
for file in dist/netssh_* dist/install.sh dist/checksums.txt; do
name=$(basename "$file")
echo "↑ $name"
curl -sf -X POST \