From 7c36a661038025a2282052e910f69a4535321b80 Mon Sep 17 00:00:00 2001 From: Vomitblood Date: Wed, 7 Aug 2024 15:23:09 +0800 Subject: [PATCH] added back github actions workflow updated github actions workflow --- .github/workflows/build-validation.yml | 73 ++++++++++++++++++++++++++ README | 1 - README.md | 4 ++ build.sh | 16 ++++-- 4 files changed, 89 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/build-validation.yml delete mode 100644 README create mode 100644 README.md diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml new file mode 100644 index 0000000..9284b86 --- /dev/null +++ b/.github/workflows/build-validation.yml @@ -0,0 +1,73 @@ +name: Test Build Frontend + +on: + push: + branches: + - "*" + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ubuntu:22.04 + + steps: + - name: Install git + run: apt update && apt install -y git + + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Get Variables + run: | + git config --global --add safe.directory /__w/stort/stort + echo "TAG_NAME=commit-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + + - name: Update packages + run: apt update && apt upgrade -y + + - name: Install dependencies for Tauri + run: apt install -y cargo libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev + + - name: Install mise + run: | + install -dm 755 /etc/apt/keyrings + wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null + echo 'deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main' | tee /etc/apt/sources.list.d/mise.list + apt update + apt install -y mise + + - name: Install mise tools + run: | + mise install + mise settings set experimental true + + - name: Install bun packages + run: mise exec bun --command 'bun install' + + - name: Build Tauri + run: mise exec bun --command 'bun run tauri build' + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.TAG_NAME }} + release_name: ${{ env.TAG_NAME }} + draft: false + prerelease: false + + - name: Upload build to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./src-tauri/target/release/bundle/appimage/stort_0.1.0_amd64.AppImage + asset_name: stort.AppImage + asset_content_type: application/octet-stream diff --git a/README b/README deleted file mode 100644 index 25c6776..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -A launcher for Steam Deck to be used in Game Mode. diff --git a/README.md b/README.md new file mode 100644 index 0000000..fccae5d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Stort + +[![Test Build Frontend](https://github.com/Vomitblood/stort/actions/workflows/build-validation.yml/badge.svg)](https://github.com/Vomitblood/stort/actions/workflows/build-validation.yml) +A launcher for Steam Deck to be used in Game Mode. diff --git a/build.sh b/build.sh index 1ad6bc1..6c06fc1 100644 --- a/build.sh +++ b/build.sh @@ -15,15 +15,23 @@ docker run --rm -it \ -v "$HOST_PROJECT_DIR":$CONTAINER_PROJECT_DIR \ $IMAGE_NAME \ /bin/bash -c " - apt-get update && apt-get upgrade -y && \ - apt-get install -y cargo libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev && \ + + # update packages + apt update && apt upgrade -y && \ + # install tauri dependencies + apt install -y cargo libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev && \ + + # install mise install -dm 755 /etc/apt/keyrings && \ wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null && \ echo 'deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main' | tee /etc/apt/sources.list.d/mise.list && \ - apt-get update && \ - apt-get install -y mise && \ + apt update && \ + # install mise tools + apt install -y mise && \ + + # build cd $CONTAINER_PROJECT_DIR && \ mise install && \ mise settings set experimental true && \