File tree 3 files changed +42
-6
lines changed
3 files changed +42
-6
lines changed Original file line number Diff line number Diff line change
1
+ name : homebrew-releaser
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ homebrew-releaser :
9
+ runs-on : ubuntu-latest
10
+ name : homebrew-releaser
11
+ steps :
12
+ - name : publish tap
13
+ uses : Justintime50/homebrew-releaser@v1
14
+ with :
15
+ homebrew_owner : grampelberg
16
+ homebrew_tap : homebrew-kty
17
+ github_token : ${{ secrets.BREW_TOKEN }}
18
+
19
+ commit_owner : Thomas Rampelberg
20
+ commit_email : thomas@saunter.org
21
+
22
+ install : ' bin.install "kty" => "kty"'
23
+ test : ' assert_match("kty", shell_output("kty"))'
24
+
25
+ target_darwin_amd64 : false
26
+ target_darwin_arm64 : true
27
+ target_linux_amd64 : true
28
+ target_linux_arm64 : true
29
+
30
+ update_readme_table : true
31
+ skip_commit : false
32
+
33
+ debug : true
Original file line number Diff line number Diff line change 51
51
env :
52
52
POSTHOG_API_KEY : ${{ secrets.POSTHOG_API_KEY }}
53
53
run : |
54
- just set-version build-binary
55
-
56
- - name : rename
57
- run : |-
58
- cp target/release/kty kty-${{ matrix.os }}-${{ matrix.arch }}
54
+ just set-version build-binary tar-bin ${{ matrix.os }} ${{ matrix.arch }}
59
55
60
56
- uses : actions/upload-artifact@v4
61
57
with :
Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ build-binary:
40
40
build-image :
41
41
docker build -t {{ image }} -f docker/ kty.dockerfile .
42
42
43
+ tar-bin os arch :
44
+ tar -czf kty-{{ version }} -{{ os }} -{{ arch }} .tar.gz -C target/ release kty
45
+
43
46
login-ghcr :
44
47
@ if [ -z ${GHCR_USER+ x} ] || [ -z ${GHCR_TOKEN+ x} ]; then \
45
48
echo " {{ red }} GHCR_USER and/or GHCR_TOKEN is not set.{{ normal }} See .envrc.example" && exit 1 ; \
@@ -67,10 +70,14 @@ extract-from-digests:
67
70
echo " Extracting {{ image }} @sha256:${sha}"
68
71
69
72
container_id=" $(docker create --platform=${os}/${arch} {{ image }} @sha256:${sha})"
70
- docker cp " ${container_id}:/usr/local/bin/kty" " /tmp/bins/${name} "
73
+ docker cp " ${container_id}:/usr/local/bin/kty" " /tmp/bins/kty "
71
74
docker rm " ${container_id}"
75
+
76
+ tar -czf " /tmp/bins/kty-{{ version }} -${os}-${arch}.tar.gz" -C / tmp/ bins kty
72
77
done
73
78
79
+ rm / tmp/ bins/ kty
80
+
74
81
set-version :
75
82
git grep -l " {{ version_placeholder }} " | grep -v " justfile" | xargs -I {} sed -i' .tmp' -e ' s/{{ version_placeholder }} /{{ version }} /g' {}
76
83
You can’t perform that action at this time.
0 commit comments