Skip to content

Commit

Permalink
ci: Update shorten URL (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaminyam committed Apr 19, 2024
1 parent 8ebfb69 commit 8f27aaa
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,86 @@ jobs:
# wheels after buildling them to add arch-specific tags.
run: |
twine upload dist/*.whl dist/*.tar.gz
- name: Extract stable release version
id: extract_stable_release_version
run: |
release_version=$(awk -F'.' '{print $1"."$2}' <<< "${{ github.ref_name }}")
echo "RELEASE_VERSION=$release_version" >> $GITHUB_OUTPUT
- name: Update stable installer shorten URL
if: ${{ !env.IS_PRERELEASE }} && ${{ vars.STABLE_RELEASE }} == ${{ steps.extract_stable_release_version.outputs.RELEASE_VERSION }}
run: |
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-stable-macos-aarch64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-macos-aarch64"
}'
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-stable-macos-x86_64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-macos-x86_64"
}'
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-stable-linux-aarch64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-linux-aarch64"
}'
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-stable-linux-x86_64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-linux-x86_64"
}'
- name: Extract edge release version
id: extract_edge_release_version
run: |
release_version=$(git branch -r | grep -E 'origin/[0-9]{2}\.[0-9]{2}$' | awk -F'/' '{print $2}' | sort -V | tail -n 1)
echo "RELEASE_VERSION=$release_version" >> $GITHUB_OUTPUT
- name: Update edge installer shorten URL
if: ${{ github.ref_name }} == ${{ steps.extract_edge_release_version.outputs.RELEASE_VERSION }}
run: |
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-edge-macos-aarch64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-macos-aarch64"
}'
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-edge-macos-x86_64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-macos-x86_64"
}'
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-edge-linux-aarch64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-linux-aarch64"
}'
curl -X 'PATCH' \
'https://bnd.ai/rest/v3/short-urls/installer-edge-linux-x86_64' \
-H 'accept: application/json' \
-H 'X-Api-Key: ${{ secrets.SHLINK_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{
"longUrl": "https://github.com/lablup/backend.ai/releases/download/${{ github.ref_name }}/backendai-install-linux-x86_64"
}'
build-conda-pack-for-windows:
Expand Down

0 comments on commit 8f27aaa

Please sign in to comment.