From 0c21f1898a1823d5b81eb0f1533ac95f82cac24a Mon Sep 17 00:00:00 2001 From: jutty Date: Wed, 18 Feb 2026 17:07:26 -0300 Subject: [PATCH] CI: Extract upload step from justfile --- .forgejo/workflows/publish.yaml | 14 ++++++++++++-- .justfile | 12 +++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index 121df44..ae5a935 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -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 diff --git a/.justfile b/.justfile index d2fbf1e..0799a57 100644 --- a/.justfile +++ b/.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