summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorKyren223 <kyren223@proton.me>2025-08-03 12:45:44 +0300
committerKyren223 <kyren223@proton.me>2025-08-03 12:45:44 +0300
commit42a0354026c0312c54fe98ec65273ef3cd671a42 (patch)
tree8e297cde42691fb19075b8ca0e6962667df26fed /.github/workflows/release.yml
parent5aefc03a135c5f42d61a67602c0fa25dc0751839 (diff)
More windows fun yayyyy
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml25
1 files changed, 18 insertions, 7 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 091a43e..cd87d19 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -57,18 +57,29 @@ jobs:
with:
go-version: stable
- - name: Install zip via Chocolatey (PowerShell)
+ - name: Package on Windows (PowerShell)
if: runner.os == 'Windows'
shell: pwsh
run: |
- # Install the CLI
- choco install zip.commandline --no-progress -y
- # Load the helper module and refresh the environment
- $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Source)\..\.."
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- refreshenv # activates zip in current session
+ $GOARCH = "${{ matrix.target.split('/')[1] }}"
+ $GOOS = "windows"
+ $BIN = "eko.exe"
+ $DEST = "dist/eko-${GOARCH}-$GOOS.zip"
+
+ # Maybe: Compress-Archive -Path $BIN or use Get-ChildItem
+ Compress-Archive -LiteralPath $BIN -DestinationPath $DEST
+
+ # Compute SHA256 checksum – via built-in command or external tool if missing
+ if (Get-Command shasum -ErrorAction SilentlyContinue) {
+ shasum -a 256 $DEST | Out-File "$DEST.sha256" -Encoding ascii
+ } else {
+ # fallback: use PowerShell's Get-FileHash
+ $hash = (Get-FileHash $DEST -Algorithm SHA256).Hash
+ "$hash $(Split-Path $DEST -Leaf)" | Out-File "$DEST.sha256"
+ }
- name: Build binary
+ if: runner.os != 'Windows'
shell: bash
run: |
TARGET="${{ matrix.target }}"