Skip to content

Commit

Permalink
Simplified workflow and improved dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Oct 20, 2024
1 parent 2c03aa8 commit 0ef055c
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ jobs:
--build-arg GITHUB_REF_NAME \
.
image:
name: Build container image
needs:
- release
runs-on: ubuntu-24.04
steps:

- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -99,26 +109,17 @@ jobs:
prefix: helper
tools: jq regclient

- name: Build container image
- name: Fetch release asset
run: |
case "$( uname -m )" in
x86_64)
ARCH=amd64
;;
aarch64)
ARCH=arm64
;;
*)
echo "Unsupported architecture: $( uname -m )"
exit 1
;;
esac
UNIGET_PATH="$(
./helper/usr/local/bin/jq --raw-output --arg arch "${ARCH}" '.[] | select(.goarch == $arch) | .path' dist/artifacts.json \
| cut -d/ -f-2
)"
for ARCH in x86_64 aarch64; do
mkdir -p "dist/default_linux_${ARCH}"
curl --silent --show-error --location --fail \
"https://github.com/uniget-org/cli/releases/download/v${GITHUB_REF_NAME}/uniget_Linux_${ARCH}.tar.gz" \
| tar --extract --gzip --directory "dist/default_linux_${ARCH}" uniget
done
mv "${UNIGET_PATH}" "dist/default_linux_${ARCH}"
- name: Build container image
run: |
VERSION="$(
"dist/default_linux_${ARCH}/uniget" --version \
| cut -d' ' -f3
Expand Down

0 comments on commit 0ef055c

Please sign in to comment.