diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80327f6..f27744e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: path: build/bin/webhelper-windows-amd64.exe build-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v4 @@ -81,7 +81,7 @@ jobs: echo "version=dev-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT fi - - name: Install Linux dependencies + - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y \ @@ -123,6 +123,77 @@ jobs: build/bin/webhelper-linux-amd64 build/bin/webhelper-linux-arm64 + build-linux-new: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Get version + id: version + run: | + if [ "${{ github.ref_type }}" = "tag" ]; then + echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT + else + echo "version=dev-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + fi + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libgtk-3-dev \ + libwebkit2gtk-4.1-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + patchelf + + - name: Install Wails + run: go install github.com/wailsapp/wails/v2/cmd/wails@latest + + - name: Build amd64 + env: + CGO_ENABLED: 1 + GOOS: linux + GOARCH: amd64 + run: | + wails build \ + -platform linux/amd64 \ + -tags webkit2_41 \ + -ldflags "-X webhelper/global.Version=${{ steps.version.outputs.version }}" \ + -o webhelper-linux-amd64-webkit2_41 + + - name: Build arm64 + env: + CGO_ENABLED: 0 + GOOS: linux + GOARCH: arm64 + run: | + wails build \ + -platform linux/arm64 \ + -tags webkit2_41 \ + -ldflags "-X webhelper/global.Version=${{ steps.version.outputs.version }}" \ + -o webhelper-linux-arm64-webkit2_41 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + path: | + build/bin/webhelper-linux-amd64-webkit2_41 + build/bin/webhelper-linux-arm64-webkit2_41 + build-macos: runs-on: macos-latest steps: @@ -183,7 +254,7 @@ jobs: build/bin/webhelper-darwin-arm64 release: - needs: [build-windows, build-linux, build-macos] + needs: [build-windows, build-linux, build-linux-new, build-macos] if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest