Skip to content

Commit 4eeaf4d

Browse files
authored
use tar to retain executable bit in released assets (#628)
1 parent 604c064 commit 4eeaf4d

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,15 @@ jobs:
9595
GOARM: "7"
9696
CC: arm-linux-gnueabihf-gcc
9797

98+
- name: tarball Linux binaries
99+
run: |
100+
tar -czf linux-kubelogin.tar.gz bin/linux_*
101+
98102
- name: Upload Linux artifacts
99103
uses: actions/upload-artifact@v4
100104
with:
101105
name: linux-binaries
102-
path: bin/linux_*
106+
path: linux-kubelogin.tar.gz
103107

104108
build-macos:
105109
name: Build macOS
@@ -131,11 +135,15 @@ jobs:
131135
GOOS: darwin
132136
GOARCH: arm64
133137

138+
- name: tarball macos binaries
139+
run: |
140+
tar -czf macos-kubelogin.tar.gz bin/darwin_*
141+
134142
- name: Upload macOS artifacts
135143
uses: actions/upload-artifact@v4
136144
with:
137145
name: macos-binaries
138-
path: bin/darwin_*
146+
path: macos-kubelogin.tar.gz
139147

140148
build-windows:
141149
name: Build Windows
@@ -186,13 +194,16 @@ jobs:
186194
with:
187195
path: bin
188196

197+
- name: untar binaries
198+
run: |
199+
tar -xzf bin/linux-binaries/linux-kubelogin.tar.gz
200+
tar -xzf bin/macos-binaries/macos-kubelogin.tar.gz
201+
189202
- name: Move binaries to correct locations
190203
run: |
191204
mkdir -p bin/linux_amd64 bin/linux_arm64 bin/linux_armv7 \
192205
bin/darwin_amd64 bin/darwin_arm64 \
193206
bin/windows_amd64 bin/windows_arm64
194-
mv bin/linux-binaries/linux_* bin/
195-
mv bin/macos-binaries/darwin_* bin/
196207
mv bin/windows-binaries/windows_* bin/
197208
rm -rf bin/linux-binaries bin/macos-binaries bin/windows-binaries
198209

0 commit comments

Comments
 (0)