-
Notifications
You must be signed in to change notification settings - Fork 141
22 lines (22 loc) · 888 Bytes
/
Copy pathrelease.yaml
File metadata and controls
22 lines (22 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
on:
release:
types: [created, published]
name: Handle Release
jobs:
kgctl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: DeterminateSystems/determinate-nix-action@v3.17.2
- uses: DeterminateSystems/magic-nix-cache-action@v14
- run: |
nix build .#kgctl-cross-linux-amd64 .#kgctl-cross-linux-arm64 .#kgctl-cross-linux-arm .#kgctl-cross-darwin-amd64 .#kgctl-cross-darwin-arm64 .#kgctl-cross-windows-amd64
for result in $(find -L . -name 'kgctl*' | grep result); do
cp "$result" "$(echo "$result" | sed 's|.*bin/\(.\+\)_\(.\+\)/kgctl\(.*\)|kgctl-\1-\2\3|g; s|.*bin/kgctl|kgctl-linux-amd64|g')"
done
- name: Publish Release
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: "kgctl-*"