2727 run : |
2828 set -euo pipefail
2929 VERSION="${GITHUB_REF_NAME#v}"
30+ export VERSION
3031 node -e 'const fs=require("fs"); const p=require("./package.json"); p.version=process.env.VERSION; fs.writeFileSync("./package.json", JSON.stringify(p,null,2)+"\n");'
31- env :
32- VERSION : ${{ github.ref_name }}
3332
3433 - name : Build Linux
3534 run : |
@@ -74,19 +73,16 @@ jobs:
7473 run : |
7574 set -euo pipefail
7675 VERSION="${GITHUB_REF_NAME#v}"
76+ export VERSION
7777 node -e 'const fs=require("fs"); const p=require("./package.json"); p.version=process.env.VERSION; fs.writeFileSync("./package.json", JSON.stringify(p,null,2)+"\n");'
78- env :
79- VERSION : ${{ github.ref_name }}
8078
8179 - name : Build macOS
8280 run : |
8381 set -euo pipefail
8482 mkdir -p dist/bin dist/archives
8583
86- # Build x64 binary
8784 bun build src/cli.ts --compile --target=bun-darwin-x64 --outfile=dist/bin/ek
8885
89- # ✅ COPY COMPLETION FILES
9086 cp src/complete/ek.bash dist/bin/
9187 cp src/complete/ek.zsh dist/bin/
9288
9793
9894 touch -t 202001010000 dist/bin/ek
9995
100- # Create arm64 tarball
10196 COPYFILE_DISABLE=1 tar -czf dist/archives/enkryptify_Darwin_arm64.tar.gz -C dist/bin ek ek.bash ek.zsh
10297
10398 - uses : actions/upload-artifact@v4
@@ -120,22 +115,18 @@ jobs:
120115 shell : pwsh
121116 run : |
122117 $version = $env:GITHUB_REF_NAME -replace '^v',''
123- $env:VERSION = $version
124- node -e "const fs=require('fs'); const p=require('./package.json'); p.version=process.env.VERSION; fs.writeFileSync('./package.json', JSON.stringify(p,null,2)+'`n');"
118+ node -e "const fs=require('fs'); const p=require('./package.json'); p.version='$version'; fs.writeFileSync('./package.json', JSON.stringify(p,null,2));"
125119
126120 - name : Build Windows
127121 shell : pwsh
128122 run : |
129123 New-Item -ItemType Directory -Force dist\bin\enkryptify-completion | Out-Null
130124 New-Item -ItemType Directory -Force dist\archives | Out-Null
131125
132- # Build CLI
133126 bun build src/cli.ts --compile --target=bun-windows-x64 --outfile=dist\bin\ek.exe
134127
135- # Copy PowerShell module INTO A FOLDER
136128 Copy-Item src\complete\enkryptify-completion.psm1 dist\bin\enkryptify-completion\
137129
138- # Set fixed timestamps for deterministic zip (PowerShell)
139130 $fixedDate = Get-Date "2020-01-01 00:00:00"
140131 (Get-Item dist\bin\ek.exe).LastWriteTime = $fixedDate
141132 (Get-Item dist\bin\enkryptify-completion).LastWriteTime = $fixedDate
0 commit comments