diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a232f7c..a8c01bb 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -140,13 +140,13 @@ jobs: # Ensure the release exists (idempotent — both jobs may call this). REL_ID=$(curl -fsS -H "$AUTH" "${API}/releases/tags/${TAG}" \ - | python3 -c "import sys,json;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true) + | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2 || true) if [ -z "$REL_ID" ]; then BODY="Gridline ${TAG#v} — Linux and Windows installers." REL_ID=$(curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \ -d "{\"tag_name\":\"${TAG}\",\"name\":\"Gridline ${TAG#v}\",\"body\":\"${BODY}\",\"draft\":true}" \ "${API}/releases" \ - | python3 -c "import sys,json;print(json.load(sys.stdin)['id'])") + | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) fi BUNDLE="${GITHUB_WORKSPACE}/desktop/src-tauri/target/release/bundle" @@ -189,7 +189,13 @@ jobs: OUT="${GITHUB_WORKSPACE}/desktop/src-tauri/resources/pg_tools" mkdir -p "$OUT" URL="https://get.enterprisedb.com/postgresql/postgresql-${PG_VER}-1-windows-x64-binaries.zip" - curl -fsSL "$URL" -o /tmp/pg.zip + CACHE="/c/ci/cache/postgresql-${PG_VER}-1-windows-x64-binaries.zip" + if [ -f "$CACHE" ]; then + echo "Using cached PG zip: $CACHE" + cp "$CACHE" /tmp/pg.zip + else + curl -fsSL "$URL" -o /tmp/pg.zip + fi EXPECTED="3508d8f085bc3980f38211a82e3f31e5fcae9952105d3dc2f8be67b64a822baa" echo "$EXPECTED /tmp/pg.zip" | sha256sum -c - sha256sum /tmp/pg.zip @@ -205,16 +211,34 @@ jobs: OUT="${GITHUB_WORKSPACE}/desktop/src-tauri/resources/mysql_tools" mkdir -p "$OUT" URL="https://archive.mariadb.org/mariadb-${MARIADB_VER}/winx64-packages/mariadb-${MARIADB_VER}-winx64.zip" - curl -fsSL "$URL" -o /tmp/mariadb.zip + CACHE="/c/ci/cache/mariadb-${MARIADB_VER}-winx64.zip" + if [ -f "$CACHE" ]; then + echo "Using cached MariaDB zip: $CACHE" + cp "$CACHE" /tmp/mariadb.zip + else + curl -fsSL "$URL" -o /tmp/mariadb.zip + fi sha256sum /tmp/mariadb.zip unzip -o /tmp/mariadb.zip -d /tmp/mariadb WINROOT="/tmp/mariadb/mariadb-${MARIADB_VER}-winx64" cp "$WINROOT"/bin/mariadb-dump.exe "$WINROOT"/bin/mariadb.exe "$OUT"/ cp "$WINROOT"/lib/libmariadb.dll "$OUT"/ + # rustc resolves `link.exe` via PATH for the windows-msvc target, but Git + # for Windows ships GNU coreutils with its own `link.exe` that shadows + # MSVC's linker (`link: extra operand ...`). Load the MSVC dev + # environment so PATH/LIB/INCLUDE point at the real MSVC toolchain. + # Fails fast here (instead of at link time) if the toolchain is missing. + - name: Set up MSVC build environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + - name: Build installers - shell: bash - run: bun run --filter gridline-desktop tauri build + shell: cmd + run: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + bun run --filter gridline-desktop tauri build - name: Create release and upload Windows assets shell: bash @@ -227,13 +251,13 @@ jobs: AUTH="Authorization: token ${GITHUB_TOKEN}" REL_ID=$(curl -fsS -H "$AUTH" "${API}/releases/tags/${TAG}" \ - | python3 -c "import sys,json;print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true) + | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2 || true) if [ -z "$REL_ID" ]; then BODY="Gridline ${TAG#v} — Linux and Windows installers." REL_ID=$(curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \ -d "{\"tag_name\":\"${TAG}\",\"name\":\"Gridline ${TAG#v}\",\"body\":\"${BODY}\",\"draft\":true}" \ "${API}/releases" \ - | python3 -c "import sys,json;print(json.load(sys.stdin)['id'])") + | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) fi BUNDLE="${GITHUB_WORKSPACE}/desktop/src-tauri/target/release/bundle" diff --git a/README.md b/README.md index 3c9d8ad..5d0f279 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,16 @@ ## Download -Grab the installer for your OS from the [latest release](https://git.ranio.xyz/adrianbonpin/gridline/releases/latest) — the links below point at the current release (**v0.7.11**): +Grab the installer for your OS from the [latest release](https://git.ranio.xyz/adrianbonpin/gridline/releases/latest) — the links below point at the current release (**v0.7.12**): | OS | Architecture | Download | | :--------------------------- | :--------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- | -| **macOS** | Apple Silicon (M1/M2/M3/M4…) | [Gridline_0.7.11_aarch64.dmg](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.11/Gridline_0.7.11_aarch64.dmg) | -| **macOS** | Intel | [Gridline_0.7.11_x64.dmg](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.11/Gridline_0.7.11_x64.dmg) | -| **Windows** | x64 | [Gridline_0.7.11_x64-setup.exe](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.11/Gridline_0.7.11_x64-setup.exe) | -| **Debian / Ubuntu** | amd64 | [Gridline_0.7.11_amd64.deb](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.11/Gridline_0.7.11_amd64.deb) | -| **Fedora / RHEL / openSUSE** | x86_64 | [Gridline-0.7.11-1.x86_64.rpm](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.11/Gridline-0.7.11-1.x86_64.rpm) | -| **Other Linux** | amd64 | [Gridline_0.7.11_amd64.AppImage](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.11/Gridline_0.7.11_amd64.AppImage) | +| **macOS** | Apple Silicon (M1/M2/M3/M4…) | [Gridline_0.7.12_aarch64.dmg](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.12/Gridline_0.7.12_aarch64.dmg) | +| **macOS** | Intel | [Gridline_0.7.12_x64.dmg](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.12/Gridline_0.7.12_x64.dmg) | +| **Windows** | x64 | [Gridline_0.7.12_x64-setup.exe](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.12/Gridline_0.7.12_x64-setup.exe) | +| **Debian / Ubuntu** | amd64 | [Gridline_0.7.12_amd64.deb](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.12/Gridline_0.7.12_amd64.deb) | +| **Fedora / RHEL / openSUSE** | x86_64 | [Gridline-0.7.12-1.x86_64.rpm](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.12/Gridline-0.7.12-1.x86_64.rpm) | +| **Other Linux** | amd64 | [Gridline_0.7.12_amd64.AppImage](https://git.ranio.xyz/adrianbonpin/gridline/releases/download/v0.7.12/Gridline_0.7.12_amd64.AppImage) | **macOS via Homebrew** (recommended for Mac users): @@ -54,7 +54,7 @@ The cask strips the macOS quarantine flag automatically during install, so **no > **macOS first launch:** macOS may say *"Gridline is damaged and can't be opened"* or *"the developer cannot be verified"* — this is expected; the app isn't Developer-ID signed/notarized yet. See the [macOS first-launch instructions](#installers-are-unsigned-for-now) (right-click → Open, or the one-time `xattr` fix). Not sure if your Mac is Intel or Apple Silicon? See [Which file should I download?](#which-file-should-i-download) below.