From 230a7fb01a1507500a6c06448dc94952d3a5a296 Mon Sep 17 00:00:00 2001 From: Mixaz <31244102+Mixaz017@users.noreply.github.com> Date: Tue, 7 May 2024 22:34:22 +0900 Subject: [PATCH 1/3] Revert "feat: auto readme downlaod links" This reverts commit a0745090b2d1fe04617a80384362d22c3268967b. --- README.md | 2 +- esbuilder.js | 28 +--------------------------- package.json | 3 +-- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index f151b56..528b7ad 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ > a fast, feature-rich krunker client written in typescript -**Download:** [Windows (x64)](https://github.com/KraXen72/crankshaft/releases/download/1.8.0/crankshaft-setup-win-x64.exe) - [Mac (x64)](https://github.com/KraXen72/crankshaft/releases/download/1.8.0/crankshaft-portable-mac-x64.dmg) - [Linux (x86_64 AppImage)](https://github.com/KraXen72/crankshaft/releases/download/1.8.0/crankshaft-portable-linux-x86_64.AppImage) - [Linux (i386 AppImage)](https://github.com/KraXen72/crankshaft/releases/download/1.8.0/crankshaft-portable-linux-i386.AppImage) - [Other](https://github.com/KraXen72/crankshaft/releases/tag/1.8.0) +**Download:** [Windows (x64)](https://github.com/KraXen72/crankshaft/releases/latest/download/crankshaft-setup-win-x64.exe) - [Mac (x64)](https://github.com/KraXen72/crankshaft/releases/latest/download/crankshaft-portable-mac-x64.dmg) - [Linux (x86_64 AppImage)](https://github.com/KraXen72/crankshaft/releases/latest/download/crankshaft-portable-linux-x86_64.AppImage) - [Linux (i386 AppImage)](https://github.com/KraXen72/crankshaft/releases/latest/download/crankshaft-portable-linux-i386.AppImage) - [Other](https://github.com/KraXen72/crankshaft/releases/latest) ## upcoming breaking change - **from version `1.9.0`, crankshaft will no longer support `Documents/Crankshaft` for configuration.** diff --git a/esbuilder.js b/esbuilder.js index 634bc96..d7e630a 100644 --- a/esbuilder.js +++ b/esbuilder.js @@ -1,11 +1,9 @@ // crankshaft's build script. uses esbuild, which is a fast js build tool written in go. const esbuild = require('esbuild'); -const fs = require('fs'); const args = process.argv.filter(a => a.startsWith("--")) const building = args.includes("--build") const watching = args.includes("--watch") -const syncDL = args.includes("--syncdl") console.log("building(minifying):", building, "watching:", watching) const buildLogger = { @@ -16,7 +14,7 @@ const buildLogger = { } const buildOptions = { - // keep this manually in-sync! + // keep this manually in-sync! THANKS FOR LETTING ME KNOW! entryPoints: [ 'src/main.ts', 'src/menu.ts', @@ -48,30 +46,6 @@ async function watch(extraOptions) { await ctx.watch() } -async function syncDownloadLinks() { - const req = await fetch(`https://api.github.com/repos/KraXen72/crankshaft/releases`); - const res = await req.json(); - const releases = res.filter(r => !(r.prerelease || r.draft)) - const latestStable = releases[0] - const dlLinksByName = Object.fromEntries(latestStable.assets.map(asset => [asset.name, asset.browser_download_url])) - - // console.log(latestStable) - const downloadMarkdown = `**Download:** [Windows (x64)](${dlLinksByName['crankshaft-setup-win-x64.exe']}) - [Mac (x64)](${dlLinksByName['crankshaft-portable-mac-x64.dmg']}) - [Linux (x86_64 AppImage)](${dlLinksByName['crankshaft-portable-linux-x86_64.AppImage']}) - [Linux (i386 AppImage)](${dlLinksByName['crankshaft-portable-linux-i386.AppImage']}) - [Other](${latestStable.html_url}) ` - // console.log(downloadMarkdown) - - const readmeLines = fs.readFileSync('./README.md', { encoding: 'utf-8' }).split("\n") - for (let i = 0; i < readmeLines.length; i++) { - if (!readmeLines[i].startsWith("**Download:** [Windows (x64)](")) continue; - readmeLines[i] = downloadMarkdown - break; - } - - fs.writeFileSync('./README.md', readmeLines.join("\n"), { encoding: 'utf-8' }) - console.log("[updated readme with latest stable download links]") -} - -if (syncDL) syncDownloadLinks() - if (watching) { watch({ plugins: [ buildLogger ] }); } else { diff --git a/package.json b/package.json index 1cd6196..45c82ae 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ "dev": "concurrently --kill-others \"node esbuilder.js --watch\" \"electron .\"", "testbuild": "pnpm run build && electron .", "dist": "pnpm run build && electron-builder", - "release": "pnpm run build --syncdl && electron-builder --publish always", - "syncdl": "node esbuilder.js --build --syncdl", + "release": "pnpm run build && electron-builder --publish always", "lint": "eslint .", "changelog-c": "conventional-changelog -i CHANGELOG.md -s -p conventionalcommits -r 0", "changelog-a": "conventional-changelog -i CHANGELOG.md -s -r 1" From 9a91e63fb9e665064e9258d602e114f6f3506011 Mon Sep 17 00:00:00 2001 From: Mixaz <31244102+Mixaz017@users.noreply.github.com> Date: Thu, 9 May 2024 21:50:02 +0900 Subject: [PATCH 2/3] ci: Build on macOS 13 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da11e80..637c4cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-13, ubuntu-latest, windows-latest] steps: - name: Install g++-multilib From 7fdbf0652d7172c4667ba043d39932d567f677d2 Mon Sep 17 00:00:00 2001 From: Mixaz <31244102+Mixaz017@users.noreply.github.com> Date: Fri, 10 May 2024 22:49:48 +0900 Subject: [PATCH 3/3] ci: Update action versions to supress node 16 warnings --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 637c4cc..b8176d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,15 +21,15 @@ jobs: sudo apt install g++-multilib - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v4 with: version: latest - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: latest cache: pnpm @@ -43,9 +43,9 @@ jobs: GH_TOKEN: ${{ secrets.github_token }} - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Binaries-${{ runner.os }} + name: binaries-${{ matrix.os }} path: dist/crankshaft-* release: needs: build @@ -57,15 +57,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Create nightly release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: - files: Binaries-*/* + files: binaries-*/* body_path: ${{ github.workspace }}/.github/workflows/notes.md name: Nightly release tag_name: nightly