From 0aa50bc6b5d2b02d1de7ff34824fcd464c779d67 Mon Sep 17 00:00:00 2001 From: Lim Jet <57783762+daoauth@users.noreply.github.com> Date: Sun, 1 Sep 2024 22:49:38 +0900 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c3bff37 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Build and Release Walrus Site Builder + +on: + release: + types: [created] + +permissions: + actions: read + id-token: write + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + + - name: Clone Walrus Sites repository + run: | + git clone https://github.com/MystenLabs/walrus-sites.git + + - name: Build site builder + run: | + cd walrus-sites + cargo build --release + mkdir -p ../release + ARCH=$(uname -m) + cp target/release/site-builder ../release/site-builder-${ARCH} + + - name: Download additional files + run: | + mkdir -p ./download + curl -L https://storage.googleapis.com/mysten-walrus-binaries/walrus-latest-ubuntu-x86_64 -o ./download/walrus-latest-ubuntu-x86_64 + curl -L https://storage.googleapis.com/mysten-walrus-binaries/walrus-configs/client_config.yaml -o ./download/client_config.yaml + + - name: Upload Release to GitHub + uses: softprops/action-gh-release@v1 + with: + files: | + ./release/site-builder-* + ./download/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}