Improve log handling and buffer management in LogsPopover component #60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| discussions: write | |
| env: | |
| NODE_OPTIONS: '--max-old-space-size=4096' | |
| BUILD: 'true' | |
| WORKING_DIRECTORY: '.' | |
| WEBVIEW2: 'browser' | |
| jobs: | |
| build: | |
| strategy: | |
| # Failure in one platform build won't impact the others | |
| fail-fast: false | |
| matrix: | |
| build: | |
| - name: 'spinup' | |
| platform: 'linux/amd64' | |
| os: 'ubuntu-22.04' | |
| - name: 'spinup' | |
| platform: 'darwin/universal' | |
| os: 'macos-latest' | |
| # - name: 'Spinup' | |
| # platform: 'windows/amd64' | |
| # os: 'windows-latest' | |
| runs-on: ${{ matrix.build.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # Setup and configure Go | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| check-latest: true | |
| go-version: '1.23' | |
| - run: go version | |
| shell: bash | |
| # Setup pnpm | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| run_install: false | |
| # Setup and configure NodeJS | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: './frontend/pnpm-lock.yaml' | |
| # Get the version from the common/.version file and set it as an environment variable | |
| - name: Set SPINUP_VERSION | |
| id: get_version | |
| run: echo "SPINUP_VERSION=$(cat ./common/.version | sed 's/^v//')" >> $GITHUB_ENV | |
| shell: bash | |
| # install Wails | |
| - name: Install Wails | |
| run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| shell: bash | |
| - name: Update Ubuntu package list | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update | |
| shell: bash | |
| - name: Install Ubuntu Wails deps | |
| if: runner.os == 'Linux' | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: libgtk-3-0 libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev gcc-aarch64-linux-gnu rpm | |
| - name: Install macOS Wails deps | |
| if: runner.os == 'macOS' | |
| run: brew install mitchellh/gon/gon | |
| shell: bash | |
| # Building step | |
| - name: Build Linux App | |
| if: runner.os == 'Linux' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: | | |
| sed -i.bak "s/{{version}}/${{ env.SPINUP_VERSION }}/g" wails.json && rm wails.json.bak | |
| wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -o ${{ matrix.build.name }}-${{ env.SPINUP_VERSION }} -tags webkit2_40 | |
| wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -o ${{ matrix.build.name }}-${{ env.SPINUP_VERSION }}-ubuntu24.04 -tags webkit2_41 | |
| shell: bash | |
| - name: Build macOs App | |
| if: runner.os == 'macOS' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: | | |
| sed -i.bak "s/{{version}}/${{ env.SPINUP_VERSION }}/g" wails.json && rm wails.json.bak | |
| wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -o ${{ matrix.build.name }} | |
| shell: bash | |
| - name: Build Windows App + Installer | |
| if: runner.os == 'Windows' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: | | |
| sed -i "s/{{version}}/${{ env.SPINUP_VERSION }}/g" wails.json | |
| wails build --platform ${{ matrix.build.platform }} -webview2 ${{ env.WEBVIEW2 }} -nsis -o ${{ matrix.build.name }}-${{ env.SPINUP_VERSION }} | |
| shell: bash | |
| # Add permissions to the binary | |
| - name: Add Linux perms | |
| if: runner.os == 'Linux' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: chmod +x build/bin/* | |
| shell: bash | |
| - name: Add macOS perms | |
| if: runner.os == 'macOS' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: chmod +x build/bin/*/Contents/MacOS/* | |
| shell: bash | |
| # Generate icons for Linux and macOS | |
| - name: Load cached icons | |
| # if: runner.os == 'Linux' || runner.os == 'macOS' | |
| if: runner.os == 'Linux' | |
| id: cache-icons | |
| uses: actions/cache@v4 | |
| with: | |
| key: ${{ runner.os }}-icons-${{ hashFiles('images/icon-large.png') }} | |
| path: | | |
| packaging/unix/usr/share/icons | |
| packaging/unix/usr/share/pixmaps | |
| - name: Generate icons | |
| # if: (runner.os == 'Linux' || runner.os == 'macOS') && steps.cache-icons.outputs.cache-hit != 'true' | |
| if: runner.os == 'Linux' && steps.cache-icons.outputs.cache-hit != 'true' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: bash ./scripts/generate-icons.sh | |
| shell: bash | |
| # Package as .deb for Ubuntu | |
| - name: Package as .deb for Ubuntu | |
| if: runner.os == 'Linux' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: bash ./scripts/release/package-deb.sh | |
| # Package as .zip for macOS | |
| - name: Package as .zip for macOS | |
| if: runner.os == 'macOS' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: bash ./scripts/release/package-macos-zip.sh | |
| # Package as .rpm for RPM based distros | |
| - name: Package as .rpm for RPM based distros | |
| if: runner.os == 'Linux' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: bash ./scripts/release/package-rpm.sh | |
| # Check if Ubuntu deb installs correctly | |
| - name: Check if Ubuntu deb installs correctly | |
| if: runner.os == 'Linux' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: | | |
| sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.1-dev nginx dnsmasq | |
| sudo dpkg -i ./deb/spinup-${{ env.SPINUP_VERSION }}-ubuntu24.04.deb | |
| spinup --version | |
| shell: bash | |
| # Check if macOS zip installs correctly | |
| - name: Check if macOS zip installs correctly | |
| if: runner.os == 'macOS' | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| run: | | |
| brew install nginx dnsmasq | |
| unzip -q -o ./spinup-${{ env.SPINUP_VERSION }}-macos.zip -d /tmp/spinup | |
| cd /tmp/spinup/ | |
| sudo bash ./install.sh | |
| spinup --version | |
| shell: bash | |
| # Upload build assets | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.build.name }} (${{ runner.os }}) | |
| path: | | |
| */bin/*.exe | |
| *\bin\*.exe | |
| */spinup-*.deb | |
| spinup-*.rpm | |
| spinup-*.zip | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| */bin/*.exe | |
| */spinup-*.deb | |
| spinup-*.rpm | |
| spinup-*.zip |