mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-12 18:57:51 -04:00
71ff927711
# Description of Changes <!-- Please describe your change, mention any related tickets, and so on here. --> This adds a github actions workflow for attaching artifacts to a release. After this PR merges it can manually be invoked in the github actions page. # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> None # Expected complexity level and risk 1 - This can't really break anything other than the release artifacts <!-- How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change. This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code. If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways. --> # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> It worked when I tested it just now. Look at the release here: https://github.com/clockworklabs/SpacetimeDB/releases Plus you can check the job output here: https://github.com/clockworklabs/SpacetimeDB/actions/runs/19578784486/job/56071106846?pr=3724 --------- Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
name: Attach client binaries to release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_tag:
|
|
description: "Release tag (e.g. v1.9.0)"
|
|
required: true
|
|
|
|
jobs:
|
|
upload-assets:
|
|
runs-on: spacetimedb-new-runner
|
|
container:
|
|
image: localhost:5000/spacetimedb-ci:latest
|
|
options: >-
|
|
--privileged
|
|
permissions:
|
|
contents: write # needed to modify releases
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download artifacts from private base URL
|
|
env:
|
|
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
|
|
BASE_URL: ${{ secrets.ARTIFACT_BASE_URL }}
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
FULL_URL="$BASE_URL/$RELEASE_TAG"
|
|
|
|
mkdir -p artifacts
|
|
cd artifacts
|
|
|
|
download() {
|
|
local filename="$1"
|
|
if ! wget -q "${FULL_URL}/${filename}" -O "${filename}"; then
|
|
echo "Failed to download ${filename}"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
download "spacetime-aarch64-apple-darwin.tar.gz"
|
|
download "spacetime-aarch64-unknown-linux-gnu.tar.gz"
|
|
download "spacetime-x86_64-apple-darwin.tar.gz"
|
|
download "spacetime-x86_64-pc-windows-msvc.zip"
|
|
download "spacetime-x86_64-unknown-linux-gnu.tar.gz"
|
|
download "spacetimedb-update-aarch64-apple-darwin"
|
|
download "spacetimedb-update-aarch64-unknown-linux-gnu"
|
|
download "spacetimedb-update-x86_64-apple-darwin"
|
|
download "spacetimedb-update-x86_64-pc-windows-msvc.exe"
|
|
download "spacetimedb-update-x86_64-unknown-linux-gnu"
|
|
|
|
- name: Upload artifacts to GitHub Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
cd artifacts
|
|
|
|
gh release upload "$RELEASE_TAG" ./* \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--clobber
|
|
|