From 1c790976ab415720aace8804362068f5cd7c073d Mon Sep 17 00:00:00 2001 From: Gregory Gauthier Date: Mon, 30 Mar 2026 12:04:39 +0100 Subject: [PATCH] ci(release): enhance workflow with PowerShell install instructions - Add PowerShell quick install snippet to release notes body - Update MIME type detection to include .ps1 files as text/plain - Remove unnecessary comments from workflow script --- .gitea/workflows/release.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a93d333..7338622 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -46,7 +46,6 @@ jobs: sha256sum build/grokkit-*.tar.gz | tee build/checksums.txt cp scripts/grokkit-install.sh build/ cp scripts/grokkit-install.ps1 build/ - # Clean up raw binaries (keep only tars, checksums, sh) for plat in 'linux/amd64' 'linux/arm64' 'darwin/amd64' 'darwin/arm64' 'windows/amd64'; do IFS='/' read -r OS ARCH <<< "$plat" BIN="grokkit-${OS}-${ARCH}" @@ -61,20 +60,18 @@ jobs: run: | VERSION=${GITHUB_REF#refs/tags/} GITEA_API=https://repos.gmgauthier.com/api/v1 - # Create release curl -X POST "${GITEA_API}/repos/${GITHUB_REPOSITORY}/releases" \ -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ - -d "{\"tag_name\": \"${VERSION}\",\"name\": \"Grokkit ${VERSION}\",\"body\": \"## Quick Install\\n\\n```bash\\ncurl -L https://repos.gmgauthier.com/gmgauthier/grokkit/releases/download/v${VERSION}/grokkit-install.sh | VERSION=${VERSION} bash\\n```\\n\\nAssets include platform binaries (tar.gz), checksums.txt. See CHANGELOG.md.\"}" > release.json + -d "{\"tag_name\": \"${VERSION}\",\"name\": \"Grokkit ${VERSION}\",\"body\": \"## Quick Install\\n\\n### Bash (Linux/macOS)\\n\\n```bash\\ncurl -L https://repos.gmgauthier.com/gmgauthier/grokkit/releases/download/v${VERSION}/grokkit-install.sh | VERSION=${VERSION} bash\\n```\\n\\n### PowerShell (Windows/macOS/Linux)\\n\\n```powershell\\nirm https://repos.gmgauthier.com/gmgauthier/grokkit/releases/download/v${VERSION}/grokkit-install.ps1; & .\\grokkit-install.ps1 -Version ${VERSION}\\n```\\n\\nAssets include platform binaries (tar.gz), checksums.txt. See CHANGELOG.md.\"}" > release.json RELEASE_ID=$(jq .id release.json) - # Upload assets for asset in build/* ; do name=$(basename "$asset") mime="application/octet-stream" [[ "$name" =~ \.tar\.gz$ ]] && mime="application/gzip" - [[ "$name" =~ \.(txt|sh)$ ]] && mime="text/plain" + [[ "$name" =~ \.(txt|sh|ps1)$ ]] && mime="text/plain" curl -X POST "${GITEA_API}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${name}" \ -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: ${mime}" \ --data-binary "@$asset" - done + done \ No newline at end of file