Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,34 @@ jobs:
dist/zt-darwin-arm64.sha256
dist/zt-windows-amd64.exe.sha256
dist/checksums.txt

- name: Update Scoop bucket
run: |
VERSION="${GITHUB_REF_NAME#v}"
HASH=$(awk '{print $1}' dist/zt-windows-amd64.exe.sha256)

if [[ ! "$HASH" =~ ^[a-fA-F0-9]{64}$ ]]; then
echo "error: could not read a valid sha256 from dist/zt-windows-amd64.exe.sha256 (got: '$HASH')" >&2
exit 1
fi

# This job runs with the tag as a detached HEAD (that's what
# built the release binaries), but the bucket lives on main —
# switch there before editing it.
git fetch origin main
git checkout -B main origin/main

jq --arg version "$VERSION" --arg hash "$HASH" \
'.version = $version | .architecture["64bit"].hash = $hash' \
bucket/zt.json > bucket/zt.json.tmp
mv bucket/zt.json.tmp bucket/zt.json

git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git diff --quiet -- bucket/zt.json; then
echo "bucket/zt.json already up to date, nothing to commit"
else
git add bucket/zt.json
git commit -m "chore(scoop): bump bucket to ${GITHUB_REF_NAME}"
git push origin main
fi
44 changes: 0 additions & 44 deletions .github/workflows/scoop-update.yml

This file was deleted.

6 changes: 3 additions & 3 deletions bucket/zt.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"version": "0.7.0",
"version": "0.7.1",
"description": "Zero Trust tunnel manager for Cloudflare — one command to expose a local service through Cloudflare Zero Trust.",
"homepage": "https://github.com/casablanque-code/cfzt",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/casablanque-code/cfzt/releases/download/v0.7.0/zt-windows-amd64.exe#/zt.exe",
"hash": "d6e70b93f56c13ff56073d1277cc14577dd4fc6829c76078e573064cfdd87374"
"url": "https://github.com/casablanque-code/cfzt/releases/download/v0.7.1/zt-windows-amd64.exe#/zt.exe",
"hash": "78ce364064c793da96ac9447442c1d51f07627be5dd198a8c4c538494b05c45b"
}
},
"bin": "zt.exe",
Expand Down
Loading