CI: Extract upload step from justfile
This commit is contained in:
parent
1cd6545c4a
commit
4bcd207281
2 changed files with 15 additions and 11 deletions
|
|
@ -51,6 +51,16 @@ jobs:
|
|||
|
||||
mv -v /tmp/tools/just /tmp/tools/cargo-llvm-cov /usr/local/bin
|
||||
|
||||
- name: Build release binary and upload it
|
||||
run: just upload
|
||||
- name: Build release binary
|
||||
run: just full-build
|
||||
- name: Upload release binary to git.jutty.dev package registry
|
||||
run: |
|
||||
api_root=https://git.jutty.dev/api/
|
||||
url=$api_root/packages/jutty/generic/en/$version/en-x86_64-linux-gnu
|
||||
|
||||
curl -fsSL \
|
||||
--user jutty:${{ secrets.GJD_REGISTRY_TOKEN }} \
|
||||
--upload-file target/release/en $url
|
||||
|
||||
- name: Print sha256sum
|
||||
run: just shasum
|
||||
|
|
|
|||
12
.justfile
12
.justfile
|
|
@ -280,16 +280,10 @@ upload: full-build && shasum
|
|||
api_root=https://git.jutty.dev/api/
|
||||
url=$api_root/packages/jutty/generic/en/$version/en-x86_64-linux-gnu
|
||||
file=target/release/en
|
||||
if [ "${CI:-}" = true ]; then
|
||||
curl -fsSL \
|
||||
--user jutty:${{{{ secrets.GJD_REGISTRY_TOKEN }} \
|
||||
--upload-file $file $url
|
||||
else
|
||||
curl -fsSL \
|
||||
--user jutty:$(secret-tool lookup Title gjd-registry-token) \
|
||||
--upload-file $file $url
|
||||
|
||||
fi
|
||||
curl -fsSL \
|
||||
--user jutty:$(secret-tool lookup Title gjd-registry-token) \
|
||||
--upload-file $file $url
|
||||
|
||||
alias u := upload
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue