From c284d249cc8c92922d07dc4627d86f488369f80f Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:12:57 -0800 Subject: [PATCH 01/18] adding ci.yml --- .github/workflows/ci.yml | 54 +++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ foreman-extern.toml | 6 +++++ foreman.toml | 1 + scripts/test.luau | 25 +++++++++++++++++ src/util/log.luau | 5 ++++ tests/project/init.luau | 1 + tests/run-test-project.luau | 6 +++++ tests/test.project.json | 11 ++++++++ 9 files changed, 111 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 foreman-extern.toml create mode 100644 scripts/test.luau create mode 100644 tests/project/init.luau create mode 100644 tests/run-test-project.luau create mode 100644 tests/test.project.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..65869ff --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + test: + name: Test (${{ matrix.os }}) + timeout-minutes: 1 + runs-on: ${{ matrix.runner }} + strategy: + max-parallel: 1 + matrix: + include: + - os: Linux + runner: ubuntu-latest + setup-foreman: true + - os: Windows + runner: windows-latest + setup-foreman: false + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up external foreman + if: matrix.setup-foreman + run: | + cp foreman-extern.toml foreman.toml + + - name: Generate access token + uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 + id: setup_token + with: + app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} + private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} + + - name: Get foreman and run foreman install + uses: Roblox/setup-foreman@v3 + with: + version: "^1.0.0" + token: ${{ steps.setup_token.outputs.token }} + allow-external-github-orgs: true + + - name: Run tests + env: + LOG_NO_COLOR: 1 + ROBLOX_API_KEY: ${{ secrets.ROBLOX_API_KEY }} + TEST_UNIVERSE_ID: ${{ secrets.TEST_UNIVERSE_ID }} + TEST_PLACE_ID: ${{ secrets.TEST_PLACE_ID }} + run: | + lute scripts/test diff --git a/.gitignore b/.gitignore index 3094469..9a0215e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .DS_Store build +.env +output.rbxl diff --git a/foreman-extern.toml b/foreman-extern.toml new file mode 100644 index 0000000..3a6c4c7 --- /dev/null +++ b/foreman-extern.toml @@ -0,0 +1,6 @@ +[tools] +lute = { source = "luau-lang/lute", version = "=0.1.0-nightly.20251106" } +selene = { source = "Kampfkarren/selene", version = "0.29.0" } +stylua = { source = "JohnnyMorganz/StyLua", version = "2.0.1" } +darklua = { github = "seaofvoices/darklua", version = "=0.17.1" } +rojo = { source = "rojo-rbx/rojo", version = "7.3.0" } diff --git a/foreman.toml b/foreman.toml index 05f294d..aa76c73 100644 --- a/foreman.toml +++ b/foreman.toml @@ -3,3 +3,4 @@ lute = { source = "luau-lang/lute", version = "=0.1.0-nightly.20251106" } selene = { source = "Roblox/Kampfkarren-selene", version = "0.29.0" } stylua = { source = "Roblox/JohnnyMorganz-StyLua", version = "2.0.1" } darklua = { github = "seaofvoices/darklua", version = "=0.17.1" } +rojo = { source = "Roblox/rojo-rbx-rojo", version = "7.3.0" } diff --git a/scripts/test.luau b/scripts/test.luau new file mode 100644 index 0000000..8e1b506 --- /dev/null +++ b/scripts/test.luau @@ -0,0 +1,25 @@ +local process = require("@lute/process") + +local log = require("../src/util/log") +log.setLevel("debug") + +local runProcess = require("../src/util/runProcess") + +runProcess({ + "lute", + "scripts/build", +}) + +runProcess({ + "build/rocale-cli", + "run", + "--script", + "tests/run-test-project.luau", + "--placeId", + process.env.TEST_PLACE_ID, + "--universeId", + process.env.TEST_UNIVERSE_ID, + "--load.project", + "tests/test.project.json", + "--verbose", +}) diff --git a/src/util/log.luau b/src/util/log.luau index 329cabe..ae4e93f 100644 --- a/src/util/log.luau +++ b/src/util/log.luau @@ -10,7 +10,12 @@ local log = {} type Level = "trace" | "debug" | "info" | "warn" | "error" local currentLevel: Level = "info" + local colorsEnabled = true -- set to false to disable colors +if process.env.LOG_NO_COLOR then + colorsEnabled = false +end + local showCaller = true -- set to false to disable caller information local levels = { diff --git a/tests/project/init.luau b/tests/project/init.luau new file mode 100644 index 0000000..b30e187 --- /dev/null +++ b/tests/project/init.luau @@ -0,0 +1 @@ +return true diff --git a/tests/run-test-project.luau b/tests/run-test-project.luau new file mode 100644 index 0000000..ad323fc --- /dev/null +++ b/tests/run-test-project.luau @@ -0,0 +1,6 @@ +local ReplicatedStorage = game:GetService("ReplicatedStorage") + +local TestProject = require(ReplicatedStorage:FindFirstChild("TestProject")) +assert(TestProject == true, "TestProject did not return true") + +return diff --git a/tests/test.project.json b/tests/test.project.json new file mode 100644 index 0000000..51e4420 --- /dev/null +++ b/tests/test.project.json @@ -0,0 +1,11 @@ +{ + "name": "TestProject", + "tree": { + "$className": "DataModel", + "ReplicatedStorage": { + "TestProject": { + "$path": "project" + } + } + } +} From a12f01e572e1c3ef1b13ab35881f3f4475fa6c19 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:14:16 -0800 Subject: [PATCH 02/18] update matrix strategy --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65869ff..11bab3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,15 +12,14 @@ jobs: timeout-minutes: 1 runs-on: ${{ matrix.runner }} strategy: + fail-fast: true max-parallel: 1 matrix: include: - os: Linux runner: ubuntu-latest - setup-foreman: true - os: Windows runner: windows-latest - setup-foreman: false steps: - name: Checkout repository uses: actions/checkout@v4 From dcbf45938878b397745ff27522571f69c4e37f2d Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:21:01 -0800 Subject: [PATCH 03/18] add release.yml --- .github/workflows/release.yml | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..eece465 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,72 @@ +name: Release + +# on: +# push: +# tags: +# - ["*"] +on: + pull_request: + push: + branches: + - master + + +jobs: + macos: + runs-on: macos-latest + timeout-minutes: 3 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Generate access token + uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 + id: setup_token + with: + app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} + private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} + + - name: Get foreman and run foreman install + uses: Roblox/setup-foreman@v3 + with: + version: "^1.0.0" + token: ${{ steps.setup_token.outputs.token }} + allow-external-github-orgs: true + + - name: Build release artifacts + run: | + lute scripts/build + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: rocale-cli-macos-x86_64 + path: build/rocale-cli + + windows: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Generate access token + uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 + id: setup_token + with: + app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} + private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} + + - name: Get foreman and run foreman install + uses: Roblox/setup-foreman@v3 + with: + version: "^1.0.0" + token: ${{ steps.setup_token.outputs.token }} + allow-external-github-orgs: true + + - name: Build release artifacts + run: | + lute scripts/build + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: rocale-cli-win64 + path: build/rocale-cli.exe From c0d9255692ada4cc1eb81a5a24f8998b5f391f67 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:21:40 -0800 Subject: [PATCH 04/18] fix release.yml --- .github/workflows/release.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eece465..5bb87d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,5 @@ name: Release -# on: -# push: -# tags: -# - ["*"] on: pull_request: push: From 3bd616de4f5a01e241ffcd954016f06ae4786aba Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:30:04 -0800 Subject: [PATCH 05/18] dont use generated token in ci --- .github/workflows/ci.yml | 12 ++---------- .github/workflows/release.yml | 6 ++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11bab3f..cf1051b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,26 +21,18 @@ jobs: - os: Windows runner: windows-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Set up external foreman if: matrix.setup-foreman run: | cp foreman-extern.toml foreman.toml - - name: Generate access token - uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 - id: setup_token - with: - app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} - private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} - - name: Get foreman and run foreman install uses: Roblox/setup-foreman@v3 with: version: "^1.0.0" - token: ${{ steps.setup_token.outputs.token }} + token: ${{ secrets.GITHUB_TOKEN }} allow-external-github-orgs: true - name: Run tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bb87d8..ebccc11 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,7 @@ jobs: runs-on: macos-latest timeout-minutes: 3 steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Generate access token uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 @@ -40,8 +39,7 @@ jobs: path: build/rocale-cli windows: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Generate access token uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 From 4c7894a8f746753eee18c2a0cfaa6ee31e840882 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:30:49 -0800 Subject: [PATCH 06/18] remove condition --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf1051b..0d7a0cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up external foreman - if: matrix.setup-foreman run: | cp foreman-extern.toml foreman.toml From f84299679b45c985aa3b602f01b2836305236d1f Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:33:48 -0800 Subject: [PATCH 07/18] fix .exe path --- scripts/build.luau | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build.luau b/scripts/build.luau index 5cbb812..e4415d0 100644 --- a/scripts/build.luau +++ b/scripts/build.luau @@ -1,4 +1,5 @@ local fs = require("@lute/fs") +local system = require("@lute/system") local log = require("../src/util/log") log.setLevel("debug") @@ -9,7 +10,12 @@ if not fs.exists("build") then fs.mkdir("build") end +local output_path = "build/rocale-cli" +if string.lower(system.os) == "windows_nt" then + output_path = output_path .. ".exe" +end + log.info("Building rocale-cli...") runProcess({ "darklua", "process", "src/cli.luau", "build/cli.luau" }) -- Remove when lute compile supports aliases -runProcess({ "lute", "compile", "build/cli.luau", "--output", "build/rocale-cli", "--show-require-graph" }) -log.info("Build complete: build/rocale-cli") +runProcess({ "lute", "compile", "build/cli.luau", "--output", output_path, "--show-require-graph" }) +log.info("Build complete: " .. output_path) From ab7ddc9af5cdf92d0d8da07e70850f7353d6bb43 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:39:55 -0800 Subject: [PATCH 08/18] fix release.yml --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d7a0cd..bad5eb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,8 @@ on: jobs: test: name: Test (${{ matrix.os }}) - timeout-minutes: 1 runs-on: ${{ matrix.runner }} + timeout-minutes: 1 strategy: fail-fast: true max-parallel: 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebccc11..97048b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,6 @@ on: branches: - master - jobs: macos: runs-on: macos-latest @@ -32,13 +31,15 @@ jobs: run: | lute scripts/build - - name: Upload artifacts - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v3 with: name: rocale-cli-macos-x86_64 path: build/rocale-cli windows: + runs-on: windows-latest + timeout-minutes: 3 + steps: - uses: actions/checkout@v4 - name: Generate access token @@ -59,8 +60,7 @@ jobs: run: | lute scripts/build - - name: Upload artifacts - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v3 with: name: rocale-cli-win64 path: build/rocale-cli.exe From 8d8ea7cc9f0f45a20a65ee6175f5bee909031707 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 13:40:56 -0800 Subject: [PATCH 09/18] change upload artifact version --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97048b5..a68699d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: run: | lute scripts/build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v5 with: name: rocale-cli-macos-x86_64 path: build/rocale-cli @@ -60,7 +60,7 @@ jobs: run: | lute scripts/build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v5 with: - name: rocale-cli-win64 + name: rocale-cli-win64.exe path: build/rocale-cli.exe From 0ad87908c44433ec1972dfd5a7ef93310ae41619 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 15:01:24 -0800 Subject: [PATCH 10/18] add linux --- .github/workflows/release.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a68699d..413f069 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,35 @@ jobs: name: rocale-cli-macos-x86_64 path: build/rocale-cli + linux: + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - uses: actions/checkout@v4 + + - name: Generate access token + uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 + id: setup_token + with: + app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} + private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} + + - name: Get foreman and run foreman install + uses: Roblox/setup-foreman@v3 + with: + version: "^1.0.0" + token: ${{ steps.setup_token.outputs.token }} + allow-external-github-orgs: true + + - name: Build release artifacts + run: | + lute scripts/build + + - uses: actions/upload-artifact@v5 + with: + name: rocale-cli-linux-x86_64 + path: build/rocale-cli + windows: runs-on: windows-latest timeout-minutes: 3 @@ -62,5 +91,5 @@ jobs: - uses: actions/upload-artifact@v5 with: - name: rocale-cli-win64.exe + name: rocale-cli-windows-x86_64.exe path: build/rocale-cli.exe From cfa4feb2aea44fb9626ebc465d86fc56d9723a7b Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 18:01:17 -0800 Subject: [PATCH 11/18] fetch artifacts and zip --- .github/workflows/release.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 413f069..b69ee24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,5 +91,23 @@ jobs: - uses: actions/upload-artifact@v5 with: - name: rocale-cli-windows-x86_64.exe + name: rocale-cli-windows-x86_64 path: build/rocale-cli.exe + + release: + runs-on: ubuntu-latest + timeout-minutes: 3 + needs: + - macos + - linux + - windows + steps: + - uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Zip release artifacts + run: | + zip -rj rocale-cli-macos-x86_64.zip ./artifacts/rocale-cli-macos-x86_64/* + zip -rj rocale-cli-linux-x86_64.zip ./artifacts/rocale-cli-linux-x86_64/* + zip -rj rocale-cli-windows-x86_64.zip ./artifacts/rocale-cli-windows-x86_64/* From 1212c41113f7186e13ee699cd4e2b88d1ff364bf Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 18:10:06 -0800 Subject: [PATCH 12/18] make release job matrix --- .github/workflows/ci.yml | 1 - .github/workflows/release.yml | 88 ++++++++--------------------------- 2 files changed, 20 insertions(+), 69 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bad5eb4..bb5337a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ jobs: runs-on: ${{ matrix.runner }} timeout-minutes: 1 strategy: - fail-fast: true max-parallel: 1 matrix: include: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b69ee24..f2d8050 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,67 +7,22 @@ on: - master jobs: - macos: - runs-on: macos-latest - timeout-minutes: 3 - steps: - - uses: actions/checkout@v4 - - - name: Generate access token - uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 - id: setup_token - with: - app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} - private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} - - - name: Get foreman and run foreman install - uses: Roblox/setup-foreman@v3 - with: - version: "^1.0.0" - token: ${{ steps.setup_token.outputs.token }} - allow-external-github-orgs: true - - - name: Build release artifacts - run: | - lute scripts/build - - - uses: actions/upload-artifact@v5 - with: - name: rocale-cli-macos-x86_64 - path: build/rocale-cli - - linux: - runs-on: ubuntu-latest - timeout-minutes: 3 - steps: - - uses: actions/checkout@v4 - - - name: Generate access token - uses: Roblox-ActionsCache/tibdex-github-app-token@v1.4.0 - id: setup_token - with: - app_id: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_ID }} - private_key: ${{ secrets.TOKENS_APP_LUA_ECOSYSTEM_DEPENDENCIES_KEY }} - - - name: Get foreman and run foreman install - uses: Roblox/setup-foreman@v3 - with: - version: "^1.0.0" - token: ${{ steps.setup_token.outputs.token }} - allow-external-github-orgs: true - - - name: Build release artifacts - run: | - lute scripts/build - - - uses: actions/upload-artifact@v5 - with: - name: rocale-cli-linux-x86_64 - path: build/rocale-cli - - windows: - runs-on: windows-latest - timeout-minutes: 3 + build: + name: Build (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 1 + strategy: + matrix: + include: + - os: macos + runner: macos-latest + artifact_path: "build/rocale-cli" + - os: linux + runner: ubuntu-latest + artifact_path: "build/rocale-cli" + - os: windows + runner: windows-latest + artifact_path: "build/rocale-cli.exe" steps: - uses: actions/checkout@v4 @@ -91,18 +46,15 @@ jobs: - uses: actions/upload-artifact@v5 with: - name: rocale-cli-windows-x86_64 - path: build/rocale-cli.exe + name: rocale-cli-${{ matrix.platform }}-x86_64 + path: ${{ matrix.artifact_path }} release: runs-on: ubuntu-latest timeout-minutes: 3 - needs: - - macos - - linux - - windows + needs: build steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: path: artifacts From 1d64fbeea10f0b95a75f9dd72b0fa8faa8dcaf31 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 18:10:27 -0800 Subject: [PATCH 13/18] fix runs-on --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f2d8050..75512fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build (${{ matrix.os }}) - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.runner }} timeout-minutes: 1 strategy: matrix: From b53fffc5293f110ac01dc801fc2dbd7c620f6119 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Fri, 7 Nov 2025 18:11:45 -0800 Subject: [PATCH 14/18] fix artifact name --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb5337a..38b2645 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,9 @@ jobs: max-parallel: 1 matrix: include: - - os: Linux + - os: linux runner: ubuntu-latest - - os: Windows + - os: windows runner: windows-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75512fa..3068e8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: - uses: actions/upload-artifact@v5 with: - name: rocale-cli-${{ matrix.platform }}-x86_64 + name: rocale-cli-${{ matrix.os }}-x86_64 path: ${{ matrix.artifact_path }} release: From 6f80ecae7b11d4661304448a682ca95622e53d10 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Mon, 10 Nov 2025 13:49:57 -0800 Subject: [PATCH 15/18] finish release ci --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38b2645..a103d12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: test: - name: Test (${{ matrix.os }}) + name: Test - ${{ matrix.os }} runs-on: ${{ matrix.runner }} timeout-minutes: 1 strategy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3068e8e..8e54693 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,12 @@ name: Release on: - pull_request: push: - branches: - - master + tags: ["v*.*.*"] jobs: build: - name: Build (${{ matrix.os }}) + name: Build - ${{ matrix.os }} runs-on: ${{ matrix.runner }} timeout-minutes: 1 strategy: @@ -63,3 +61,39 @@ jobs: zip -rj rocale-cli-macos-x86_64.zip ./artifacts/rocale-cli-macos-x86_64/* zip -rj rocale-cli-linux-x86_64.zip ./artifacts/rocale-cli-linux-x86_64/* zip -rj rocale-cli-windows-x86_64.zip ./artifacts/rocale-cli-windows-x86_64/* + + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: true + + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./rocale-cli-macos-x86_64.zip + asset_name: rocale-cli-macos-x86_64.zip + asset_content_type: application/zip + + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./rocale-cli-linux-x86_64.zip + asset_name: rocale-cli-linux-x86_64.zip + asset_content_type: application/zip + + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./rocale-cli-windows-x86_64.zip + asset_name: rocale-cli-windows-x86_64.zip + asset_content_type: application/zip From bdedb02b88c3963b107b3da895c21d262bb90510 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Mon, 10 Nov 2025 16:54:23 -0800 Subject: [PATCH 16/18] switch to softprops to glob for release artifacts --- .github/workflows/release.yml | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e54693..a9c232f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,38 +62,10 @@ jobs: zip -rj rocale-cli-linux-x86_64.zip ./artifacts/rocale-cli-linux-x86_64/* zip -rj rocale-cli-windows-x86_64.zip ./artifacts/rocale-cli-windows-x86_64/* - - uses: actions/create-release@v1 - id: create_release + - uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} draft: true - - - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./rocale-cli-macos-x86_64.zip - asset_name: rocale-cli-macos-x86_64.zip - asset_content_type: application/zip - - - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./rocale-cli-linux-x86_64.zip - asset_name: rocale-cli-linux-x86_64.zip - asset_content_type: application/zip - - - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./rocale-cli-windows-x86_64.zip - asset_name: rocale-cli-windows-x86_64.zip - asset_content_type: application/zip + files: | + rocale-cli-*.zip From 2ef248058ac9ce695ae5d5365fb9e5296a93d580 Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Mon, 10 Nov 2025 16:55:21 -0800 Subject: [PATCH 17/18] use roblox actions cache version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9c232f..b065940 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,7 @@ jobs: zip -rj rocale-cli-linux-x86_64.zip ./artifacts/rocale-cli-linux-x86_64/* zip -rj rocale-cli-windows-x86_64.zip ./artifacts/rocale-cli-windows-x86_64/* - - uses: softprops/action-gh-release@v1 + - uses: Roblox-ActionsCache/softprops-action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From c81e0cccdd2c39c1627bef56e480bcbb812441bf Mon Sep 17 00:00:00 2001 From: Raymond Ng Date: Mon, 10 Nov 2025 16:57:03 -0800 Subject: [PATCH 18/18] use steps.token instead of env --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b065940..0f21bb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,9 +63,8 @@ jobs: zip -rj rocale-cli-windows-x86_64.zip ./artifacts/rocale-cli-windows-x86_64/* - uses: Roblox-ActionsCache/softprops-action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + token: ${{ secrets.GITHUB_TOKEN }} draft: true files: | rocale-cli-*.zip