[{"data":1,"prerenderedAt":3975},["ShallowReactive",2],{"blog-\u002Fblog\u002Fgamemaker-ci-pipeline-gitlab":3,"blog-surround-\u002Fblog\u002Fgamemaker-ci-pipeline-gitlab":3966},{"id":4,"title":5,"author":6,"body":7,"cover":3951,"date":3952,"description":3953,"draft":3954,"extension":3955,"game":3956,"meta":3957,"navigation":2205,"path":3958,"seo":3959,"stem":3960,"tags":3961,"__hash__":3965},"blog\u002Fblog\u002Fgamemaker-ci-pipeline-gitlab.md","GameMaker CI Pipeline with gm-cli and GitLab CI","Iron Lizard Games",{"type":8,"value":9,"toc":3924},"minimark",[10,14,22,27,35,38,41,51,55,58,61,71,75,78,94,103,132,154,158,161,255,262,269,274,277,320,331,338,397,401,404,655,658,702,706,716,719,856,859,863,873,880,1004,1014,1035,1038,1042,1051,1084,1087,1096,1133,1154,1172,1181,1185,1196,1199,1222,1324,1330,1334,1337,1343,1499,1503,1522,1532,1644,1654,1665,1678,1682,1685,1800,1811,1817,1828,1838,1843,1847,1862,1884,1896,1913,1953,1969,2004,2015,2019,2022,2057,2061,2071,2077,2083,2089,2093,2097,2100,2104,2111,2115,2118,2127,2131,2151,3912,3920],[11,12,13],"p",{},"Shipping a GameMaker game by hand goes like this. Open the IDE, build for Windows, then turn off your PC and switch to Ubuntu, build for Linux, unzip, rename the executable, zip again, upload each file to itch.io, type a version number, and hope you didn't upload last week's Linux build instead of the correct one. Every one of those steps is a chance to get it wrong, and you repeat them for every release.",[11,15,16,17,21],{},"This post shows how we built a ",[18,19,20],"strong",{},"GameMaker CI pipeline"," with gm-cli and GitLab CI. One button compiles Windows, Linux and web builds and uploads them to itch.io and GX.games. You get the working config, explained piece by piece, and the list of walls we ran into on the way, so you can walk around them.",[23,24,26],"h2",{"id":25},"why-mokgard-needed-automated-builds","Why Mokgard needed automated builds",[11,28,29,34],{},[30,31,33],"a",{"href":32},"\u002Fgame\u002Fmokgard","Mokgard: The War of the Oath"," is a turn-based tactics game in pixel art, made in GameMaker. It's in development and playable on itch.io and GX.games, and it gets a new build every few weeks.",[11,36,37],{},"We ship on three platforms: a Windows download, a Linux download and a version that runs in the browser. Three builds per release, by hand, is how a small team loses an afternoon. It's also how a player ends up with a Windows build one version ahead of the Linux one.",[11,39,40],{},"So we automated it. It took three attempts, months apart, and around thirty commits to the same YAML file.",[11,42,43],{},[18,44,45,46,50],{},"You'll find the complete ",[47,48,49],"code",{},".gitlab-ci.yml"," at the end of this post.",[23,52,54],{"id":53},"but-why-gitlab-and-not-github","But why GitLab and not GitHub?",[11,56,57],{},"Because when we started making games, many years ago (we're older than we'd like to admit), GitHub didn't offer private repositories on its free plan. GitLab did.",[11,59,60],{},"Add to that our opinion of GitHub's UI, which we find chaotic and slow, and of the company that owns GitHub, whose values we don't share.",[11,62,63,64,70],{},"If you'd still rather do this on GitHub, the pipeline can be adapted to GitHub Actions runners. Take a look at the excellent guide ",[30,65,69],{"href":66,"rel":67},"https:\u002F\u002Fgamemaker.io\u002Fen\u002Fblog\u002Fbs-tech-automate-builds",[68],"nofollow","Automate Your Builds in GitHub Actions"," on the GameMaker blog, a guest post from the studio Butterscotch Shenanigans. It drives Igor directly instead of gm-cli, but the overall shape is the same.",[23,72,74],{"id":73},"the-tools-gm-cli-gitlab-ci-and-butler","The tools: gm-cli, GitLab CI and butler",[11,76,77],{},"Three tools do the work. Here's what each one is, in case you haven't met them.",[11,79,80,83,84,89,90,93],{},[18,81,82],{},"gm-cli"," is ",[30,85,88],{"href":86,"rel":87},"https:\u002F\u002Fgithub.com\u002FYoYoGames\u002Fgm-cli",[68],"GameMaker's official command-line tool",", published by YoYo Games as an npm package (",[47,91,92],{},"@gamemaker\u002Fgm-cli","). It compiles, runs and packages a project without opening the IDE. It also downloads the runtime and the build tools it needs on its own, which is what makes it usable on a fresh CI machine. Under the hood it drives Igor, GameMaker's command-line compiler. gm-cli gives you a guest license by default; we will need to log in with an access key from our GameMaker account instead.",[11,95,96,99,100,102],{},[18,97,98],{},"GitLab CI"," runs jobs described in a ",[47,101,49],{}," file at the root of the repo. A few terms you'll see below:",[104,105,106,114,120,126],"ul",{},[107,108,109,110,113],"li",{},"A ",[18,111,112],{},"job"," is a list of shell commands, for example \"build for Linux\".",[107,115,109,116,119],{},[18,117,118],{},"runner"," is the machine that executes a job. GitLab.com offers hosted runners for Linux (Docker containers) and Windows.",[107,121,122,125],{},[18,123,124],{},"Artifacts"," are files a job keeps after it finishes, so a later job can use them.",[107,127,109,128,131],{},[18,129,130],{},"cache"," is a folder GitLab saves between pipeline runs to avoid downloading the same things again.",[11,133,134,83,137,142,143,146,147,146,150,153],{},[18,135,136],{},"butler",[30,138,141],{"href":139,"rel":140},"https:\u002F\u002Fitch.io\u002Fdocs\u002Fbutler\u002Fpushing.html",[68],"itch.io's command-line uploader",". It pushes a file to a \"channel\" of your game page (",[47,144,145],{},"windows",", ",[47,148,149],{},"linux",[47,151,152],{},"html5",") and only sends what changed since the last push.",[23,155,157],{"id":156},"the-gamemaker-ci-pipeline-at-a-glance","The GameMaker CI pipeline at a glance",[11,159,160],{},"The pipeline has four jobs in two stages.",[162,163,164,183],"table",{},[165,166,167],"thead",{},[168,169,170,174,177,180],"tr",{},[171,172,173],"th",{},"Job",[171,175,176],{},"Stage",[171,178,179],{},"Runner",[171,181,182],{},"Output",[184,185,186,203,221,238],"tbody",{},[168,187,188,194,197,200],{},[189,190,191],"td",{},[47,192,193],{},"build_windows",[189,195,196],{},"build",[189,198,199],{},"GitLab hosted Windows",[189,201,202],{},"Windows zip",[168,204,205,210,212,218],{},[189,206,207],{},[47,208,209],{},"build_linux",[189,211,196],{},[189,213,214,215],{},"Docker, ",[47,216,217],{},"node:24-bookworm",[189,219,220],{},"Linux zip",[168,222,223,228,231,235],{},[189,224,225],{},[47,226,227],{},"deploy_gxgames",[189,229,230],{},"deploy",[189,232,214,233],{},[47,234,217],{},[189,236,237],{},"Web zip, uploaded to GX.games",[168,239,240,245,247,252],{},[189,241,242],{},[47,243,244],{},"deploy_itch",[189,246,230],{},[189,248,214,249],{},[47,250,251],{},"debian:bookworm-slim",[189,253,254],{},"Pushes all three zips to itch.io",[11,256,257,258,261],{},"The two builds and the GX.games job run in parallel. The itch.io job waits for all three, because it also uploads the web zip that the GX.games job produces. GameMaker's GX.games export (the ",[47,259,260],{},"operagx"," target) is a WebAssembly build, and itch.io can run the same zip in the browser.",[11,263,264],{},[265,266],"img",{"alt":267,"src":268},"","gitlab-pipeline-graph.webp",[270,271,273],"h3",{"id":272},"secrets-and-a-manual-trigger","Secrets and a manual trigger",[11,275,276],{},"All jobs have the same rule:",[278,279,283],"pre",{"className":280,"code":281,"language":282,"meta":267,"style":267},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","rules:\n  - if: '$CI_PIPELINE_SOURCE == \"web\"'\n","yaml",[47,284,285,298],{"__ignoreMap":267},[286,287,290,294],"span",{"class":288,"line":289},"line",1,[286,291,293],{"class":292},"swJcz","rules",[286,295,297],{"class":296},"sMK4o",":\n",[286,299,301,304,307,310,313,317],{"class":288,"line":300},2,[286,302,303],{"class":296},"  -",[286,305,306],{"class":292}," if",[286,308,309],{"class":296},":",[286,311,312],{"class":296}," '",[286,314,316],{"class":315},"sfazB","$CI_PIPELINE_SOURCE == \"web\"",[286,318,319],{"class":296},"'\n",[11,321,322,323,326,327,330],{},"That means the pipeline only runs when someone clicks ",[18,324,325],{},"Run pipeline"," in GitLab's web UI. Our first attempt built on every push to ",[47,328,329],{},"master",". Shipping a release on every push sounds efficient until you push a typo fix in a comment and players get an \"update\" with nothing in it. A release is a decision, so we made it a button.",[11,332,333,334,337],{},"The pipeline needs a few variables to work. They live in GitLab under ",[18,335,336],{},"Settings > CI\u002FCD > Variables",", and the secret ones are marked as masked so they never show up in logs:",[104,339,340,356,374,384],{},[107,341,342,345,346,349,350,355],{},[47,343,344],{},"GM_ACCESS_KEY",": the GameMaker access key, for ",[47,347,348],{},"gm-cli login",". You can create one on the ",[30,351,354],{"href":352,"rel":353},"https:\u002F\u002Fgamemaker.io\u002Fen\u002Faccount\u002Faccess-keys",[68],"access keys page of your GameMaker account",".",[107,357,358,361,362,367,368,373],{},[47,359,360],{},"BUTLER_API_KEY",": the itch.io API key. butler reads it from the environment by that exact name. You can get it from your ",[30,363,366],{"href":364,"rel":365},"https:\u002F\u002Fitch.io\u002Fuser\u002Fsettings\u002Fapi-keys",[68],"itch.io API keys settings",", and the ",[30,369,372],{"href":370,"rel":371},"https:\u002F\u002Fitch.io\u002Fdocs\u002Fbutler\u002Flogin.html",[68],"butler login docs"," explain the details.",[107,375,376,379,380,383],{},[47,377,378],{},"ITCH_GAME",": your itch.io user and game, written as ",[47,381,382],{},"user\u002Fgame",". It isn't secret, but keeping it here means the YAML has no account names in it.",[107,385,386,146,389,392,393,396],{},[47,387,388],{},"GX_STUDIO_ID",[47,390,391],{},"GX_GAME_ID"," and ",[47,394,395],{},"GX_AUTH_JSON",": for GX.games (more on that one later, it deserves its own section).",[23,398,400],{"id":399},"building-a-gamemaker-game-for-linux-in-docker","Building a GameMaker game for Linux in Docker",[11,402,403],{},"The Linux job is the simplest, so it's the best place to start. Here is a simplified version of ours:",[278,405,407],{"className":280,"code":406,"language":282,"meta":267,"style":267},"build_linux:\n  stage: build\n  image: node:24-bookworm\n  variables:\n    GM_CONFIG: \"Build\"\n    OUTPUT_LINUX: \"build\u002Fmygame-${GAME_VERSION}-linux.zip\" #change mygame for you game name\n  cache:\n    key: \"gm-cache-v4-linux\"\n    paths:\n      - .gmcache\u002F\n  before_script:\n    - apt-get update && apt-get install -y --no-install-recommends ffmpeg zip unzip curl ca-certificates\n    - rm -rf .gmcache\u002Fbuild-gms2-*          # old build output travels in the cache\n    - npx --yes @gamemaker\u002Fgm-cli@latest login \"$GM_ACCESS_KEY\"\n  script:\n    - mkdir -p build\n    - |\n      npx --yes @gamemaker\u002Fgm-cli@latest package \\\n        --target=linux \\\n        --config=\"$GM_CONFIG\" \\\n        --toolchain-options '{\"linux\": {\"packageType\": \"zip\"}}' \\\n        --output=\"$OUTPUT_LINUX\" \\\n        --verbose\n  artifacts:\n    paths:\n      - \"build\u002Fmygame-${GAME_VERSION}-linux.zip\"\n    expire_in: 14 days\n",[47,408,409,415,425,436,444,461,481,489,504,512,521,529,538,549,557,565,573,582,588,594,600,606,612,618,626,633,644],{"__ignoreMap":267},[286,410,411,413],{"class":288,"line":289},[286,412,209],{"class":292},[286,414,297],{"class":296},[286,416,417,420,422],{"class":288,"line":300},[286,418,419],{"class":292},"  stage",[286,421,309],{"class":296},[286,423,424],{"class":315}," build\n",[286,426,428,431,433],{"class":288,"line":427},3,[286,429,430],{"class":292},"  image",[286,432,309],{"class":296},[286,434,435],{"class":315}," node:24-bookworm\n",[286,437,439,442],{"class":288,"line":438},4,[286,440,441],{"class":292},"  variables",[286,443,297],{"class":296},[286,445,447,450,452,455,458],{"class":288,"line":446},5,[286,448,449],{"class":292},"    GM_CONFIG",[286,451,309],{"class":296},[286,453,454],{"class":296}," \"",[286,456,457],{"class":315},"Build",[286,459,460],{"class":296},"\"\n",[286,462,464,467,469,471,474,477],{"class":288,"line":463},6,[286,465,466],{"class":292},"    OUTPUT_LINUX",[286,468,309],{"class":296},[286,470,454],{"class":296},[286,472,473],{"class":315},"build\u002Fmygame-${GAME_VERSION}-linux.zip",[286,475,476],{"class":296},"\"",[286,478,480],{"class":479},"sHwdD"," #change mygame for you game name\n",[286,482,484,487],{"class":288,"line":483},7,[286,485,486],{"class":292},"  cache",[286,488,297],{"class":296},[286,490,492,495,497,499,502],{"class":288,"line":491},8,[286,493,494],{"class":292},"    key",[286,496,309],{"class":296},[286,498,454],{"class":296},[286,500,501],{"class":315},"gm-cache-v4-linux",[286,503,460],{"class":296},[286,505,507,510],{"class":288,"line":506},9,[286,508,509],{"class":292},"    paths",[286,511,297],{"class":296},[286,513,515,518],{"class":288,"line":514},10,[286,516,517],{"class":296},"      -",[286,519,520],{"class":315}," .gmcache\u002F\n",[286,522,524,527],{"class":288,"line":523},11,[286,525,526],{"class":292},"  before_script",[286,528,297],{"class":296},[286,530,532,535],{"class":288,"line":531},12,[286,533,534],{"class":296},"    -",[286,536,537],{"class":315}," apt-get update && apt-get install -y --no-install-recommends ffmpeg zip unzip curl ca-certificates\n",[286,539,541,543,546],{"class":288,"line":540},13,[286,542,534],{"class":296},[286,544,545],{"class":315}," rm -rf .gmcache\u002Fbuild-gms2-*",[286,547,548],{"class":479},"          # old build output travels in the cache\n",[286,550,552,554],{"class":288,"line":551},14,[286,553,534],{"class":296},[286,555,556],{"class":315}," npx --yes @gamemaker\u002Fgm-cli@latest login \"$GM_ACCESS_KEY\"\n",[286,558,560,563],{"class":288,"line":559},15,[286,561,562],{"class":292},"  script",[286,564,297],{"class":296},[286,566,568,570],{"class":288,"line":567},16,[286,569,534],{"class":296},[286,571,572],{"class":315}," mkdir -p build\n",[286,574,576,578],{"class":288,"line":575},17,[286,577,534],{"class":296},[286,579,581],{"class":580},"s7zQu"," |\n",[286,583,585],{"class":288,"line":584},18,[286,586,587],{"class":315},"      npx --yes @gamemaker\u002Fgm-cli@latest package \\\n",[286,589,591],{"class":288,"line":590},19,[286,592,593],{"class":315},"        --target=linux \\\n",[286,595,597],{"class":288,"line":596},20,[286,598,599],{"class":315},"        --config=\"$GM_CONFIG\" \\\n",[286,601,603],{"class":288,"line":602},21,[286,604,605],{"class":315},"        --toolchain-options '{\"linux\": {\"packageType\": \"zip\"}}' \\\n",[286,607,609],{"class":288,"line":608},22,[286,610,611],{"class":315},"        --output=\"$OUTPUT_LINUX\" \\\n",[286,613,615],{"class":288,"line":614},23,[286,616,617],{"class":315},"        --verbose\n",[286,619,621,624],{"class":288,"line":620},24,[286,622,623],{"class":292},"  artifacts",[286,625,297],{"class":296},[286,627,629,631],{"class":288,"line":628},25,[286,630,509],{"class":292},[286,632,297],{"class":296},[286,634,636,638,640,642],{"class":288,"line":635},26,[286,637,517],{"class":296},[286,639,454],{"class":296},[286,641,473],{"class":315},[286,643,460],{"class":296},[286,645,647,650,652],{"class":288,"line":646},27,[286,648,649],{"class":292},"    expire_in",[286,651,309],{"class":296},[286,653,654],{"class":315}," 14 days\n",[11,656,657],{},"A few lines need explaining.",[104,659,660,671,679,690],{},[107,661,662,666,667,670],{},[18,663,664],{},[47,665,217],{},": gm-cli is a Node package and needs Node 24 or newer. Our first attempt used ",[47,668,669],{},"node:20"," and ran straight into gm-cli's engine requirement. Debian (bookworm) also has more system libraries than Alpine, which means fewer surprises from the GameMaker runtime.",[107,672,673,678],{},[18,674,675],{},[47,676,677],{},"ffmpeg",": the GameMaker compiler needs it to process audio and music.",[107,680,681,686,687,355],{},[18,682,683],{},[47,684,685],{},"--config",": the GameMaker project configuration to build with. Without the flag you get ",[47,688,689],{},"Default",[107,691,692,697,698,701],{},[18,693,694],{},[47,695,696],{},"packageType: zip",": the Linux target can also produce an AppImage. We tried. An AppImage build needs a Steam runtime folder and a Linux feature (",[47,699,700],{},"unshare",") that only privileged runners allow, and GitLab's shared Docker runners aren't privileged. A zip works on any runner.",[270,703,705],{"id":704},"renaming-the-executable-after-packaging","Renaming the executable after packaging",[11,707,708,709,712,713,715],{},"The zip comes out with an executable that takes the name of the GameMaker project. GameMaker's zip packaging ignores the executable name you set in the project options. If your project folder has a working title like ",[47,710,711],{},"my_project",", your players get ",[47,714,711],{}," too.",[11,717,718],{},"So the job unpacks the zip, renames the binary and zips it again:",[278,720,724],{"className":721,"code":722,"language":723,"meta":267,"style":267},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mkdir -p build\u002Flinux-tmp && unzip -q \"$OUTPUT_LINUX\" -d build\u002Flinux-tmp\nfind build\u002Flinux-tmp -type f -name my_project -execdir mv {} \"YOUR GAME NAME HERE\" \\;\nrm \"$OUTPUT_LINUX\"\n(cd build\u002Flinux-tmp && zip -qry \"$CI_PROJECT_DIR\u002F$OUTPUT_LINUX\" .)\nrm -rf build\u002Flinux-tmp\n","bash",[47,725,726,761,799,810,847],{"__ignoreMap":267},[286,727,728,732,735,738,741,744,747,749,753,755,758],{"class":288,"line":289},[286,729,731],{"class":730},"sBMFI","mkdir",[286,733,734],{"class":315}," -p",[286,736,737],{"class":315}," build\u002Flinux-tmp",[286,739,740],{"class":296}," &&",[286,742,743],{"class":730}," unzip",[286,745,746],{"class":315}," -q",[286,748,454],{"class":296},[286,750,752],{"class":751},"sTEyZ","$OUTPUT_LINUX",[286,754,476],{"class":296},[286,756,757],{"class":315}," -d",[286,759,760],{"class":315}," build\u002Flinux-tmp\n",[286,762,763,766,768,771,774,777,780,783,786,789,791,794,796],{"class":288,"line":300},[286,764,765],{"class":730},"find",[286,767,737],{"class":315},[286,769,770],{"class":315}," -type",[286,772,773],{"class":315}," f",[286,775,776],{"class":315}," -name",[286,778,779],{"class":315}," my_project",[286,781,782],{"class":315}," -execdir",[286,784,785],{"class":315}," mv",[286,787,788],{"class":315}," {}",[286,790,454],{"class":296},[286,792,793],{"class":315},"YOUR GAME NAME HERE",[286,795,476],{"class":296},[286,797,798],{"class":751}," \\;\n",[286,800,801,804,806,808],{"class":288,"line":427},[286,802,803],{"class":730},"rm",[286,805,454],{"class":296},[286,807,752],{"class":751},[286,809,460],{"class":296},[286,811,812,815,819,821,823,826,829,831,834,837,839,841,844],{"class":288,"line":438},[286,813,814],{"class":296},"(",[286,816,818],{"class":817},"s2Zo4","cd",[286,820,737],{"class":315},[286,822,740],{"class":296},[286,824,825],{"class":730}," zip",[286,827,828],{"class":315}," -qry",[286,830,454],{"class":296},[286,832,833],{"class":751},"$CI_PROJECT_DIR",[286,835,836],{"class":315},"\u002F",[286,838,752],{"class":751},[286,840,476],{"class":296},[286,842,843],{"class":315}," .",[286,845,846],{"class":296},")\n",[286,848,849,851,854],{"class":288,"line":446},[286,850,803],{"class":730},[286,852,853],{"class":315}," -rf",[286,855,760],{"class":315},[11,857,858],{},"Not elegant but it works.",[270,860,862],{"id":861},"shipping-the-openssl-libraries-the-linux-runner-needs","Shipping the OpenSSL libraries the Linux runner needs",[11,864,865,866,392,869,872],{},"There's one more step before zipping again. GameMaker's Linux runner, the executable that actually runs your game, is linked against OpenSSL 1.0: it needs ",[47,867,868],{},"libssl.so.1.0.0",[47,870,871],{},"libcrypto.so.1.0.0",". No current Linux distribution ships those versions, so on a modern system the game stops before it opens a window, with an \"error while loading shared libraries\" message.",[11,874,875,876,879],{},"The good news is in the same binary. The runner has an RPATH of ",[47,877,878],{},"$ORIGIN",", which tells Linux to look for libraries in the executable's own folder first. So the fix is to put the two files next to the executable. We take them from Ubuntu 18.04's package, which was built against glibc 2.27 and therefore loads on any distribution newer than that:",[278,881,883],{"className":721,"code":882,"language":723,"meta":267,"style":267},"curl -fsSL -o \u002Ftmp\u002Flibssl1.0.deb http:\u002F\u002Farchive.ubuntu.com\u002Fubuntu\u002Fpool\u002Fmain\u002Fo\u002Fopenssl1.0\u002Flibssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb\necho \"ed14555671475a2db481049b4b66ecd376f79a7ca6d4d78a1702feb037aa5422  \u002Ftmp\u002Flibssl1.0.deb\" | sha256sum -c -\ndpkg-deb -x \u002Ftmp\u002Flibssl1.0.deb \u002Ftmp\u002Flibssl1.0\nGAME_DIR=\"$(dirname \"$(find build\u002Flinux-tmp -type f -name \"$GAME_EXE_NAME\" | head -1)\")\"\ncp \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibssl.so.1.0.0 \\\n   \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibcrypto.so.1.0.0 \"$GAME_DIR\u002F\"\n",[47,884,885,902,926,939,979,990],{"__ignoreMap":267},[286,886,887,890,893,896,899],{"class":288,"line":289},[286,888,889],{"class":730},"curl",[286,891,892],{"class":315}," -fsSL",[286,894,895],{"class":315}," -o",[286,897,898],{"class":315}," \u002Ftmp\u002Flibssl1.0.deb",[286,900,901],{"class":315}," http:\u002F\u002Farchive.ubuntu.com\u002Fubuntu\u002Fpool\u002Fmain\u002Fo\u002Fopenssl1.0\u002Flibssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb\n",[286,903,904,907,909,912,914,917,920,923],{"class":288,"line":300},[286,905,906],{"class":817},"echo",[286,908,454],{"class":296},[286,910,911],{"class":315},"ed14555671475a2db481049b4b66ecd376f79a7ca6d4d78a1702feb037aa5422  \u002Ftmp\u002Flibssl1.0.deb",[286,913,476],{"class":296},[286,915,916],{"class":296}," |",[286,918,919],{"class":730}," sha256sum",[286,921,922],{"class":315}," -c",[286,924,925],{"class":315}," -\n",[286,927,928,931,934,936],{"class":288,"line":427},[286,929,930],{"class":730},"dpkg-deb",[286,932,933],{"class":315}," -x",[286,935,898],{"class":315},[286,937,938],{"class":315}," \u002Ftmp\u002Flibssl1.0\n",[286,940,941,944,947,950,953,956,958,961,963,966,968,970,973,976],{"class":288,"line":438},[286,942,943],{"class":751},"GAME_DIR",[286,945,946],{"class":296},"=",[286,948,949],{"class":296},"\"$(",[286,951,952],{"class":730},"dirname",[286,954,955],{"class":296}," \"$(",[286,957,765],{"class":730},[286,959,960],{"class":315}," build\u002Flinux-tmp -type f -name ",[286,962,476],{"class":296},[286,964,965],{"class":751},"$GAME_EXE_NAME",[286,967,476],{"class":296},[286,969,916],{"class":296},[286,971,972],{"class":730}," head",[286,974,975],{"class":315}," -1",[286,977,978],{"class":296},")\")\"\n",[286,980,981,984,987],{"class":288,"line":446},[286,982,983],{"class":730},"cp",[286,985,986],{"class":315}," \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibssl.so.1.0.0",[286,988,989],{"class":751}," \\\n",[286,991,992,995,997,1000,1002],{"class":288,"line":463},[286,993,994],{"class":315},"   \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibcrypto.so.1.0.0",[286,996,454],{"class":296},[286,998,999],{"class":751},"$GAME_DIR",[286,1001,836],{"class":315},[286,1003,460],{"class":296},[11,1005,1006,1009,1010,1013],{},[47,1007,1008],{},"dpkg-deb -x"," unpacks a Debian package without installing it, so the libraries never touch the build machine. The ",[47,1011,1012],{},"sha256sum -c"," line compares the download with a known checksum: if that file ever changes on the server, the build fails instead of quietly shipping something else.",[11,1015,1016,1017,1020,1021,1024,1025,1028,1029,1031,1032,355],{},"You can check your own runner with ",[47,1018,1019],{},"readelf -d"," on the executable. Look for ",[47,1022,1023],{},"libssl"," in the ",[47,1026,1027],{},"NEEDED"," lines and ",[47,1030,878],{}," in ",[47,1033,1034],{},"RPATH",[11,1036,1037],{},"One honest warning. OpenSSL 1.0.2 has been out of support since the end of 2019. We ship it because the runner won't start without it, and we'll drop these lines as soon as GameMaker's Linux runner links a current version.",[23,1039,1041],{"id":1040},"the-windows-build-on-gitlabs-hosted-windows-runners","The Windows build on GitLab's hosted Windows runners",[11,1043,1044,1045,1050],{},"GitLab.com has ",[30,1046,1049],{"href":1047,"rel":1048},"https:\u002F\u002Fdocs.gitlab.com\u002Fci\u002Frunners\u002Fhosted_runners\u002Fwindows\u002F",[68],"hosted Windows runners",", currently in beta and available on the free tier. You select one with a tag:",[278,1052,1054],{"className":280,"code":1053,"language":282,"meta":267,"style":267},"build_windows:\n  stage: build\n  tags:\n    - saas-windows-medium-amd64\n",[47,1055,1056,1062,1070,1077],{"__ignoreMap":267},[286,1057,1058,1060],{"class":288,"line":289},[286,1059,193],{"class":292},[286,1061,297],{"class":296},[286,1063,1064,1066,1068],{"class":288,"line":300},[286,1065,419],{"class":292},[286,1067,309],{"class":296},[286,1069,424],{"class":315},[286,1071,1072,1075],{"class":288,"line":427},[286,1073,1074],{"class":292},"  tags",[286,1076,297],{"class":296},[286,1078,1079,1081],{"class":288,"line":438},[286,1080,534],{"class":296},[286,1082,1083],{"class":315}," saas-windows-medium-amd64\n",[11,1085,1086],{},"These runners use PowerShell as the shell, and they don't come with the tools we need. Three things bit us.",[11,1088,1089,1092,1093,309],{},[18,1090,1091],{},"There is no Node 24."," So the job downloads a portable Node 24 zip into the temp folder and puts it first in the ",[47,1094,1095],{},"PATH",[278,1097,1101],{"className":1098,"code":1099,"language":1100,"meta":267,"style":267},"language-powershell shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","if (!(Test-Path -Path \"$env:TEMP\\node24\\node.exe\")) {\n  Invoke-WebRequest -Uri \"https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv24.22.2\u002Fnode-v24.22.2-win-x64.zip\" -OutFile \"$env:TEMP\\node24.zip\"\n  Expand-Archive \"$env:TEMP\\node24.zip\" -DestinationPath \"$env:TEMP\\node-temp\" -Force\n  Move-Item -Path \"$env:TEMP\\node-temp\\node-v24.22.2-win-x64\" -Destination \"$env:TEMP\\node24\" -Force\n}\n$env:PATH = \"$env:TEMP\\node24;$env:PATH\"\n","powershell",[47,1102,1103,1108,1113,1118,1123,1128],{"__ignoreMap":267},[286,1104,1105],{"class":288,"line":289},[286,1106,1107],{},"if (!(Test-Path -Path \"$env:TEMP\\node24\\node.exe\")) {\n",[286,1109,1110],{"class":288,"line":300},[286,1111,1112],{},"  Invoke-WebRequest -Uri \"https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv24.22.2\u002Fnode-v24.22.2-win-x64.zip\" -OutFile \"$env:TEMP\\node24.zip\"\n",[286,1114,1115],{"class":288,"line":427},[286,1116,1117],{},"  Expand-Archive \"$env:TEMP\\node24.zip\" -DestinationPath \"$env:TEMP\\node-temp\" -Force\n",[286,1119,1120],{"class":288,"line":438},[286,1121,1122],{},"  Move-Item -Path \"$env:TEMP\\node-temp\\node-v24.22.2-win-x64\" -Destination \"$env:TEMP\\node24\" -Force\n",[286,1124,1125],{"class":288,"line":446},[286,1126,1127],{},"}\n",[286,1129,1130],{"class":288,"line":463},[286,1131,1132],{},"$env:PATH = \"$env:TEMP\\node24;$env:PATH\"\n",[11,1134,1135,1142,1143,392,1146,1149,1150,1153],{},[18,1136,1137,1138,1141],{},"npm fails with ",[47,1139,1140],{},"ENOENT"," on a clean machine."," npm expects the folders ",[47,1144,1145],{},"%APPDATA%\\npm",[47,1147,1148],{},"%LOCALAPPDATA%\\npm-cache"," to exist, and on a fresh runner they don't. Creating them by hand before the first ",[47,1151,1152],{},"npx"," call fixes it.",[11,1155,1156,1159,1160,1163,1164,1167,1168,1171],{},[18,1157,1158],{},"PowerShell's zip command makes zips butler rejects."," After renaming the ",[47,1161,1162],{},".exe"," we re-zipped with ",[47,1165,1166],{},"Compress-Archive",". In Windows PowerShell 5, it stores a folder that only contains other folders as an empty file with the same name. butler refused to push the result. The ",[47,1169,1170],{},"tar"," that ships with Windows can write zips and doesn't have that problem:",[278,1173,1175],{"className":1098,"code":1174,"language":1100,"meta":267,"style":267},"tar -a -cf $env:OUTPUT_WIN -C build\\win-tmp .\n",[47,1176,1177],{"__ignoreMap":267},[286,1178,1179],{"class":288,"line":289},[286,1180,1174],{},[23,1182,1184],{"id":1183},"caching-gm-cli-without-poisoning-the-cache","Caching gm-cli without poisoning the cache",[11,1186,1187,1188,1191,1192,1195],{},"The first gm-cli run on a clean machine downloads the GameMaker runtime and the build tools. That's slow, so we cache it. In CI, gm-cli keeps everything in a ",[47,1189,1190],{},".gmcache"," folder inside the project: the license that ",[47,1193,1194],{},"login"," writes, Igor, the build tools and the intermediate build output.",[11,1197,1198],{},"Caching that folder saves time, but it also caches your mistakes. We learned two rules.",[1200,1201,1202,1208],"ol",{},[107,1203,1204,1207],{},[18,1205,1206],{},"Throw away a half-built cache."," We had runs where the cached folder came back without the license or the compiler, and every run after that trusted it.  Now each job checks for the license and Igor folders and deletes the whole cache if neither exists.",[107,1209,1210,1213,1214,1217,1218,1221],{},[18,1211,1212],{},"Delete the old build output."," gm-cli writes intermediate files into ",[47,1215,1216],{},".gmcache\u002Fbuild-gms2-*",". They travel in the cache to the next run and collide with the new build. One ",[47,1219,1220],{},"rm -rf"," before building solves it.",[278,1223,1225],{"className":721,"code":1224,"language":723,"meta":267,"style":267},"if [ -d \".gmcache\" ] && [ ! -d \".gmcache\u002Flicense\" ] && [ ! -d \".gmcache\u002Figor\" ]; then\n  echo \"Removing incomplete .gmcache...\"\n  rm -rf .gmcache\nfi\nrm -rf .gmcache\u002Fbuild-gms2-*\n",[47,1226,1227,1285,1297,1307,1312],{"__ignoreMap":267},[286,1228,1229,1232,1235,1237,1239,1241,1243,1246,1248,1250,1253,1255,1257,1260,1262,1264,1266,1268,1270,1272,1274,1277,1279,1282],{"class":288,"line":289},[286,1230,1231],{"class":580},"if",[286,1233,1234],{"class":296}," [",[286,1236,757],{"class":296},[286,1238,454],{"class":296},[286,1240,1190],{"class":315},[286,1242,476],{"class":296},[286,1244,1245],{"class":296}," ]",[286,1247,740],{"class":296},[286,1249,1234],{"class":296},[286,1251,1252],{"class":296}," !",[286,1254,757],{"class":296},[286,1256,454],{"class":296},[286,1258,1259],{"class":315},".gmcache\u002Flicense",[286,1261,476],{"class":296},[286,1263,1245],{"class":296},[286,1265,740],{"class":296},[286,1267,1234],{"class":296},[286,1269,1252],{"class":296},[286,1271,757],{"class":296},[286,1273,454],{"class":296},[286,1275,1276],{"class":315},".gmcache\u002Figor",[286,1278,476],{"class":296},[286,1280,1281],{"class":296}," ];",[286,1283,1284],{"class":580}," then\n",[286,1286,1287,1290,1292,1295],{"class":288,"line":300},[286,1288,1289],{"class":817},"  echo",[286,1291,454],{"class":296},[286,1293,1294],{"class":315},"Removing incomplete .gmcache...",[286,1296,460],{"class":296},[286,1298,1299,1302,1304],{"class":288,"line":427},[286,1300,1301],{"class":730},"  rm",[286,1303,853],{"class":315},[286,1305,1306],{"class":315}," .gmcache\n",[286,1308,1309],{"class":288,"line":438},[286,1310,1311],{"class":580},"fi\n",[286,1313,1314,1316,1318,1321],{"class":288,"line":446},[286,1315,803],{"class":730},[286,1317,853],{"class":315},[286,1319,1320],{"class":315}," .gmcache\u002Fbuild-gms2-",[286,1322,1323],{"class":751},"*\n",[11,1325,1326,1327,1329],{},"The cache key in our file is ",[47,1328,501],{},". Each time we suspected the cache was the problem, bumping the number was the fastest way to start clean. We bumped it a lot of times.",[270,1331,1333],{"id":1332},"when-the-tool-download-gets-blocked","When the tool download gets blocked",[11,1335,1336],{},"On GitLab's hosted runners, gm-cli's download of its build tools was answered with an HTTP 403 from Cloudflare, the network service in front of the download server. A 403 means \"forbidden\", and no amount of retrying changes it. It may work by now, but we don't dare touch something that works. If it ain't broke, don't fix it.",[11,1338,1339,1340,1342],{},"Our workaround was to download the three tool packages once on a dev machine (for Windows and Linux) and commit them to the repo. The job then installs each one into the folder gm-cli expects, after ",[47,1341,1194],{}," has created the cache:",[278,1344,1346],{"className":721,"code":1345,"language":723,"meta":267,"style":267},"for f in gm-tools-cache\u002F*linux-x64*.tgz; do\n  case \"$f\" in\n    *project-tool*) npm install --global --prefix .gmcache\u002Fproject-tool \".\u002F$f\" ;;\n    *package-tool*) npm install --global --prefix .gmcache\u002Fpackage-tool \".\u002F$f\" ;;\n    *gmpm*)         npm install --global --prefix .gmcache\u002Fgmpm \".\u002F$f\" ;;\n  esac\ndone\n",[47,1347,1348,1368,1383,1424,1456,1489,1494],{"__ignoreMap":267},[286,1349,1350,1353,1356,1359,1362,1365],{"class":288,"line":289},[286,1351,1352],{"class":580},"for",[286,1354,1355],{"class":751}," f ",[286,1357,1358],{"class":580},"in",[286,1360,1361],{"class":315}," gm-tools-cache\u002F*linux-x64*.tgz",[286,1363,1364],{"class":296},";",[286,1366,1367],{"class":580}," do\n",[286,1369,1370,1373,1375,1378,1380],{"class":288,"line":300},[286,1371,1372],{"class":580},"  case",[286,1374,454],{"class":296},[286,1376,1377],{"class":751},"$f",[286,1379,476],{"class":296},[286,1381,1382],{"class":580}," in\n",[286,1384,1385,1388,1391,1394,1397,1400,1403,1406,1409,1412,1414,1417,1419,1421],{"class":288,"line":427},[286,1386,1387],{"class":296},"    *",[286,1389,1390],{"class":315},"project-tool",[286,1392,1393],{"class":296},"*",[286,1395,1396],{"class":296},")",[286,1398,1399],{"class":730}," npm",[286,1401,1402],{"class":315}," install",[286,1404,1405],{"class":315}," --global",[286,1407,1408],{"class":315}," --prefix",[286,1410,1411],{"class":315}," .gmcache\u002Fproject-tool",[286,1413,454],{"class":296},[286,1415,1416],{"class":315},".\u002F",[286,1418,1377],{"class":751},[286,1420,476],{"class":296},[286,1422,1423],{"class":296}," ;;\n",[286,1425,1426,1428,1431,1433,1435,1437,1439,1441,1443,1446,1448,1450,1452,1454],{"class":288,"line":438},[286,1427,1387],{"class":296},[286,1429,1430],{"class":315},"package-tool",[286,1432,1393],{"class":296},[286,1434,1396],{"class":296},[286,1436,1399],{"class":730},[286,1438,1402],{"class":315},[286,1440,1405],{"class":315},[286,1442,1408],{"class":315},[286,1444,1445],{"class":315}," .gmcache\u002Fpackage-tool",[286,1447,454],{"class":296},[286,1449,1416],{"class":315},[286,1451,1377],{"class":751},[286,1453,476],{"class":296},[286,1455,1423],{"class":296},[286,1457,1458,1460,1463,1465,1467,1470,1472,1474,1476,1479,1481,1483,1485,1487],{"class":288,"line":446},[286,1459,1387],{"class":296},[286,1461,1462],{"class":315},"gmpm",[286,1464,1393],{"class":296},[286,1466,1396],{"class":296},[286,1468,1469],{"class":730},"         npm",[286,1471,1402],{"class":315},[286,1473,1405],{"class":315},[286,1475,1408],{"class":315},[286,1477,1478],{"class":315}," .gmcache\u002Fgmpm",[286,1480,454],{"class":296},[286,1482,1416],{"class":315},[286,1484,1377],{"class":751},[286,1486,476],{"class":296},[286,1488,1423],{"class":296},[286,1490,1491],{"class":288,"line":463},[286,1492,1493],{"class":580},"  esac\n",[286,1495,1496],{"class":288,"line":483},[286,1497,1498],{"class":580},"done\n",[270,1500,1502],{"id":1501},"how-to-download-the-gm-tools-packages","How to download the gm-tools packages",[11,1504,1505,1506,1509,1510,1513,1514,1517,1518,1521],{},"gm-cli installs three tools as npm packages from GameMaker's own npm registry, ",[47,1507,1508],{},"https:\u002F\u002Fgmpm.gamemaker.io",". They are ProjectTool, PackageTool and GMPM, GameMaker's package manager. The package names follow the pattern ",[47,1511,1512],{},"@gm-tools\u002F\u003Ctool>-\u003Cplatform>",", with ",[47,1515,1516],{},"linux-x64"," or ",[47,1519,1520],{},"win-x64"," as the platform.",[11,1523,1524,1527,1528,1531],{},[47,1525,1526],{},"npm pack"," downloads a package as a ",[47,1529,1530],{},".tgz"," file without installing it, which is exactly what the CI job needs. Run this once from the root of the repo, on any machine where the registry answers (your own computer is fine):",[278,1533,1535],{"className":721,"code":1534,"language":723,"meta":267,"style":267},"mkdir -p gm-tools-cache && cd gm-tools-cache\nfor platform in linux-x64 win-x64; do\n  for tool in project-tool package-tool gmpm; do\n    npm pack \"@gm-tools\u002F${tool}-${platform}\" --registry https:\u002F\u002Fgmpm.gamemaker.io\n  done\ndone\n",[47,1536,1537,1554,1573,1596,1635,1640],{"__ignoreMap":267},[286,1538,1539,1541,1543,1546,1548,1551],{"class":288,"line":289},[286,1540,731],{"class":730},[286,1542,734],{"class":315},[286,1544,1545],{"class":315}," gm-tools-cache",[286,1547,740],{"class":296},[286,1549,1550],{"class":817}," cd",[286,1552,1553],{"class":315}," gm-tools-cache\n",[286,1555,1556,1558,1561,1563,1566,1569,1571],{"class":288,"line":300},[286,1557,1352],{"class":580},[286,1559,1560],{"class":751}," platform ",[286,1562,1358],{"class":580},[286,1564,1565],{"class":315}," linux-x64",[286,1567,1568],{"class":315}," win-x64",[286,1570,1364],{"class":296},[286,1572,1367],{"class":580},[286,1574,1575,1578,1581,1583,1586,1589,1592,1594],{"class":288,"line":427},[286,1576,1577],{"class":580},"  for",[286,1579,1580],{"class":751}," tool ",[286,1582,1358],{"class":580},[286,1584,1585],{"class":315}," project-tool",[286,1587,1588],{"class":315}," package-tool",[286,1590,1591],{"class":315}," gmpm",[286,1593,1364],{"class":296},[286,1595,1367],{"class":580},[286,1597,1598,1601,1604,1606,1609,1612,1615,1618,1621,1623,1626,1629,1632],{"class":288,"line":438},[286,1599,1600],{"class":730},"    npm",[286,1602,1603],{"class":315}," pack",[286,1605,454],{"class":296},[286,1607,1608],{"class":315},"@gm-tools\u002F",[286,1610,1611],{"class":296},"${",[286,1613,1614],{"class":751},"tool",[286,1616,1617],{"class":296},"}",[286,1619,1620],{"class":315},"-",[286,1622,1611],{"class":296},[286,1624,1625],{"class":751},"platform",[286,1627,1628],{"class":296},"}\"",[286,1630,1631],{"class":315}," --registry",[286,1633,1634],{"class":315}," https:\u002F\u002Fgmpm.gamemaker.io\n",[286,1636,1637],{"class":288,"line":446},[286,1638,1639],{"class":580},"  done\n",[286,1641,1642],{"class":288,"line":463},[286,1643,1498],{"class":580},[11,1645,1646,1647,1650,1651,355],{},"You end up with six files named like ",[47,1648,1649],{},"gm-tools-project-tool-linux-x64-2026.0.176.tgz",", with the platform and the version in the name. Commit them and the CI jobs pick them up from ",[47,1652,1653],{},"gm-tools-cache\u002F",[11,1655,1656,1657,1660,1661,1664],{},"To see the latest version of a tool, run ",[47,1658,1659],{},"npm view @gm-tools\u002Fproject-tool-linux-x64 version --registry https:\u002F\u002Fgmpm.gamemaker.io",". To download a specific one, add it to the name: ",[47,1662,1663],{},"@gm-tools\u002Fproject-tool-linux-x64@2026.0.176",". The tools keep moving without you. While writing this post, the registry already had ProjectTool 2026.1.187, and our repo still builds with 2026.0.176. That's fine as long as the builds pass. When you refresh the files, refresh all six and run a full pipeline before you ship anything.",[11,1666,1667,1668,1670,1671,392,1674,1677],{},"Order matters: install the tools after ",[47,1669,348],{},", or login rebuilds the cache on top of them. And on Linux, gm-cli looks for the binaries as ",[47,1672,1673],{},"ProjectTool",[47,1675,1676],{},"PackageTool",", with capitals, while npm installs them in lowercase. Windows doesn't care about case. Linux cares a lot. A couple of symlinks fixed it.",[23,1679,1681],{"id":1680},"shipping-to-itchio-with-butler","Shipping to itch.io with butler",[11,1683,1684],{},"Once the three zips exist, the deploy job is short:",[278,1686,1688],{"className":280,"code":1687,"language":282,"meta":267,"style":267},"deploy_itch:\n  stage: deploy\n  image: debian:bookworm-slim\n  needs: [build_windows, build_linux, deploy_gxgames]\n  before_script:\n    - apt-get update && apt-get install -y --no-install-recommends curl unzip ca-certificates\n    - curl -fsSL -o butler.zip https:\u002F\u002Fbroth.itch.zone\u002Fbutler\u002Flinux-amd64\u002FLATEST\u002Farchive\u002Fdefault\n    - unzip -q butler.zip -d \u002Fusr\u002Flocal\u002Fbin && chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fbutler\n  script:\n    - butler push build\u002Fmygame-${GAME_VERSION}-windows.zip \"$ITCH_GAME:windows\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n    - butler push build\u002Fmygame-${GAME_VERSION}-linux.zip \"$ITCH_GAME:linux\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n    - unzip -l build\u002Fmygame-gx.zip | awk '{print $4}' | grep -qx index.html || { echo \"index.html is not at the zip root\"; exit 1; }\n    - butler push build\u002Fmygame-gx.zip \"$ITCH_GAME:html5\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n",[47,1689,1690,1696,1705,1714,1739,1745,1752,1759,1766,1772,1779,1786,1793],{"__ignoreMap":267},[286,1691,1692,1694],{"class":288,"line":289},[286,1693,244],{"class":292},[286,1695,297],{"class":296},[286,1697,1698,1700,1702],{"class":288,"line":300},[286,1699,419],{"class":292},[286,1701,309],{"class":296},[286,1703,1704],{"class":315}," deploy\n",[286,1706,1707,1709,1711],{"class":288,"line":427},[286,1708,430],{"class":292},[286,1710,309],{"class":296},[286,1712,1713],{"class":315}," debian:bookworm-slim\n",[286,1715,1716,1719,1721,1723,1725,1728,1731,1733,1736],{"class":288,"line":438},[286,1717,1718],{"class":292},"  needs",[286,1720,309],{"class":296},[286,1722,1234],{"class":296},[286,1724,193],{"class":315},[286,1726,1727],{"class":296},",",[286,1729,1730],{"class":315}," build_linux",[286,1732,1727],{"class":296},[286,1734,1735],{"class":315}," deploy_gxgames",[286,1737,1738],{"class":296},"]\n",[286,1740,1741,1743],{"class":288,"line":446},[286,1742,526],{"class":292},[286,1744,297],{"class":296},[286,1746,1747,1749],{"class":288,"line":463},[286,1748,534],{"class":296},[286,1750,1751],{"class":315}," apt-get update && apt-get install -y --no-install-recommends curl unzip ca-certificates\n",[286,1753,1754,1756],{"class":288,"line":483},[286,1755,534],{"class":296},[286,1757,1758],{"class":315}," curl -fsSL -o butler.zip https:\u002F\u002Fbroth.itch.zone\u002Fbutler\u002Flinux-amd64\u002FLATEST\u002Farchive\u002Fdefault\n",[286,1760,1761,1763],{"class":288,"line":491},[286,1762,534],{"class":296},[286,1764,1765],{"class":315}," unzip -q butler.zip -d \u002Fusr\u002Flocal\u002Fbin && chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fbutler\n",[286,1767,1768,1770],{"class":288,"line":506},[286,1769,562],{"class":292},[286,1771,297],{"class":296},[286,1773,1774,1776],{"class":288,"line":514},[286,1775,534],{"class":296},[286,1777,1778],{"class":315}," butler push build\u002Fmygame-${GAME_VERSION}-windows.zip \"$ITCH_GAME:windows\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n",[286,1780,1781,1783],{"class":288,"line":523},[286,1782,534],{"class":296},[286,1784,1785],{"class":315}," butler push build\u002Fmygame-${GAME_VERSION}-linux.zip \"$ITCH_GAME:linux\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n",[286,1787,1788,1790],{"class":288,"line":531},[286,1789,534],{"class":296},[286,1791,1792],{"class":315}," unzip -l build\u002Fmygame-gx.zip | awk '{print $4}' | grep -qx index.html || { echo \"index.html is not at the zip root\"; exit 1; }\n",[286,1794,1795,1797],{"class":288,"line":540},[286,1796,534],{"class":296},[286,1798,1799],{"class":315}," butler push build\u002Fmygame-gx.zip \"$ITCH_GAME:html5\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n",[11,1801,1802,1805,1806,1517,1808,1810],{},[47,1803,1804],{},"needs"," makes the job wait for the three builds and gives it their artifacts. The channel names matter: butler tags a channel with ",[47,1807,145],{},[47,1809,149],{}," in its name as a download for that platform.",[11,1812,1813,1816],{},[47,1814,1815],{},"--userversion"," is the version players see on the page. We use the game version plus the short commit hash, so any build on itch.io points back to the exact commit that produced it. When a player reports a bug in \"the latest version\", that hash tells us which one they mean.",[11,1818,1819,1820,1823,1824,1827],{},"The ",[47,1821,1822],{},"unzip -l"," line is a guard. itch.io only starts a browser game if ",[47,1825,1826],{},"index.html"," sits at the root of the zip. If it doesn't, players get a \"Failed to find index.html\" error. We'd rather the pipeline fail than the page.",[11,1829,1830,1831,1833,1834,1837],{},"One step stays manual. The first time butler creates the ",[47,1832,152],{}," channel, you have to tick ",[18,1835,1836],{},"This file will be played in the browser"," on that upload in the itch.io dashboard. Later pushes keep the setting.",[11,1839,1840],{},[265,1841],{"alt":267,"src":1842},"itch-played-browser.png",[23,1844,1846],{"id":1845},"deploying-to-gxgames-from-ci","Deploying to GX.games from CI",[11,1848,1849,1850,1853,1854,1857,1858,1861],{},"GX.games is Opera's web game platform, and gm-cli has commands for it: ",[47,1851,1852],{},"package --target=operagx"," builds the web zip, ",[47,1855,1856],{},"gxgames link"," connects the project to your game, and ",[47,1859,1860],{},"gxgames upload"," sends a new version. On a laptop that's three commands. In CI, each one tried to talk to a human who wasn't there.",[11,1863,1864,1867,1868,1871,1872,1875,1876,1879,1880,1883],{},[18,1865,1866],{},"Login opens a browser."," GX.games authenticates with OAuth in a browser window, and a CI runner has no browser. We logged in once on a dev machine, took the ",[47,1869,1870],{},"auth.json"," file that gm-cli saves, and stored it in GitLab as a variable of type ",[18,1873,1874],{},"File",". With ",[47,1877,1878],{},"CI=true",", which GitLab sets on every job, gm-cli looks for that file in ",[47,1881,1882],{},".gmcache\u002Fgxgames-auth\u002F",", so the job copies it there. When the token expires, gm-cli renews it with the refresh token inside the file.",[11,1885,1886,1892,1893,1895],{},[18,1887,1888,1891],{},[47,1889,1890],{},"link"," opens a picker."," If the studio ID or the game ID is missing, ",[47,1894,1856],{}," shows an interactive selector, there's nobody to pick, and the job dies with exit code 13. The job now checks both variables first and fails with a clear message.",[11,1897,1898,1904,1905,1908,1909,1912],{},[18,1899,1900,1903],{},[47,1901,1902],{},"upload"," asks for a version."," Without ",[47,1906,1907],{},"--version",", it prompts for one on the keyboard. The version must have four numbers (",[47,1910,1911],{},"X.Y.Z.B","), so we use the pipeline's sequential number as the last one:",[278,1914,1916],{"className":721,"code":1915,"language":723,"meta":267,"style":267},"npx --yes @gamemaker\u002Fgm-cli@latest gxgames upload --file build\u002Fmygame-gx.zip --version \"0.1.0.$CI_PIPELINE_IID\"\n",[47,1917,1918],{"__ignoreMap":267},[286,1919,1920,1922,1925,1928,1931,1934,1937,1940,1943,1945,1948,1951],{"class":288,"line":289},[286,1921,1152],{"class":730},[286,1923,1924],{"class":315}," --yes",[286,1926,1927],{"class":315}," @gamemaker\u002Fgm-cli@latest",[286,1929,1930],{"class":315}," gxgames",[286,1932,1933],{"class":315}," upload",[286,1935,1936],{"class":315}," --file",[286,1938,1939],{"class":315}," build\u002Fmygame-gx.zip",[286,1941,1942],{"class":315}," --version",[286,1944,454],{"class":296},[286,1946,1947],{"class":315},"0.1.0.",[286,1949,1950],{"class":751},"$CI_PIPELINE_IID",[286,1952,460],{"class":296},[11,1954,1955,1958,1959,1962,1963,1965,1966,1968],{},[18,1956,1957],{},"After uploading, it opens a web page."," gm-cli calls ",[47,1960,1961],{},"xdg-open"," to show you the publish page. The Docker image has no ",[47,1964,1961],{},", so the command fails and takes the job down with it, after the upload has already succeeded. The fix is a fake ",[47,1967,1961],{}," that just prints the URL:",[278,1970,1972],{"className":721,"code":1971,"language":723,"meta":267,"style":267},"printf '#!\u002Fbin\u002Fsh\\necho \"xdg-open $*\"\\n' > \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open && chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open\n",[47,1973,1974],{"__ignoreMap":267},[286,1975,1976,1979,1981,1984,1987,1990,1993,1995,1998,2001],{"class":288,"line":289},[286,1977,1978],{"class":817},"printf",[286,1980,312],{"class":296},[286,1982,1983],{"class":315},"#!\u002Fbin\u002Fsh\\necho \"xdg-open $*\"\\n",[286,1985,1986],{"class":296},"'",[286,1988,1989],{"class":296}," >",[286,1991,1992],{"class":315}," \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open",[286,1994,740],{"class":296},[286,1996,1997],{"class":730}," chmod",[286,1999,2000],{"class":315}," +x",[286,2002,2003],{"class":315}," \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open\n",[11,2005,2006,2007,2010,2011,2014],{},"Our CI only uploads an internal version to GX.games. The store metadata (",[47,2008,2009],{},"gxgames meta",") and the publish step (",[47,2012,2013],{},"gxgames publish",") we did once, by hand.",[23,2016,2018],{"id":2017},"pitfalls-we-paid-for","Pitfalls we paid for",[11,2020,2021],{},"The commit log of our pipeline reads like a diary. On a single day in October we pushed fifteen commits to the CI file. The messages go from \"pipeline\" to \"more pipeline\", then \"again and again\". Here is what those commits taught us, in one list.",[1200,2023,2024,2030,2036,2045,2051],{},[107,2025,2026,2029],{},[18,2027,2028],{},"Node 24 or nothing."," gm-cli doesn't run on older Node. Check the image before anything else.",[107,2031,2032,2035],{},[18,2033,2034],{},"Anything interactive kills a CI job."," gm-cli is friendly on a laptop: it asks for versions, offers pickers and opens browsers. In CI each of those is a crash. Pass every value as a flag and fake what you can't pass.",[107,2037,2038,2041,2042,2044],{},[18,2039,2040],{},"Protected variables are empty on unprotected branches."," GitLab only gives protected variables to pipelines running on protected branches or tags. Run the pipeline from another branch and ",[47,2043,344],{}," arrives as an empty string, so the login has no key to work with. We check for an empty key first and fail with a readable message.",[107,2046,2047,2050],{},[18,2048,2049],{},"The cache remembers everything, including your failures."," Version the cache key and validate the cache before trusting it.",[107,2052,2053,2056],{},[18,2054,2055],{},"Windows and Linux runners need separate scripts."," PowerShell and bash share no syntax, so every step of the build job exists twice. Keep them side by side in the file and change both together.",[23,2058,2060],{"id":2059},"what-wed-do-differently","What we'd do differently",[11,2062,2063,2066,2067,2070],{},[18,2064,2065],{},"Pin gm-cli."," Every job runs ",[47,2068,2069],{},"@gamemaker\u002Fgm-cli@latest",". It's convenient, and it means a new gm-cli release can break a build that worked yesterday without a single change on our side. Pinning a version and updating on purpose is the safer default.",[11,2072,2073,2076],{},[18,2074,2075],{},"Keep the tool packages out of plain Git."," The vendored tool packages weigh over 200 MB, committed straight into the repository, and Git keeps every version forever. Git LFS (Git's extension for large files) or a download from our own storage would keep clones fast.",[11,2078,2079,2082],{},[18,2080,2081],{},"Get one build green before adding anything."," Our first attempt had four stages (version number, builds, itch.io upload and a GitLab release) before a single build had ever worked. When everything fails at once, you can't tell which part is broken. The attempt that finally worked started with only the two build jobs and added the upload once they passed.",[11,2084,2085,2088],{},[18,2086,2087],{},"Put the version in one place."," The game version lives in a pipeline variable, and the GX.games version is built separately from the pipeline counter. Two version schemes for one game is one too many.",[23,2090,2092],{"id":2091},"faq","FAQ",[270,2094,2096],{"id":2095},"do-i-need-a-paid-gamemaker-license-to-use-gm-cli-in-ci","Do I need a paid GameMaker license to use gm-cli in CI?",[11,2098,2099],{},"gm-cli gives you a guest license automatically, according to its README. We log in with an access key from our GameMaker account, created at gamemaker.io under account access keys. Check GameMaker's current license terms for the targets you export to.",[270,2101,2103],{"id":2102},"can-i-use-github-actions-instead-of-gitlab-ci","Can I use GitHub Actions instead of GitLab CI?",[11,2105,2106,2107,2110],{},"Yes. The commands are the same, only the YAML around them changes. gm-cli's ",[47,2108,2109],{},"init"," command can even generate GitHub automation pipelines for a new project, and the GameMaker blog guide linked above covers GitHub Actions in depth.",[23,2112,2114],{"id":2113},"takeaway","Takeaway",[11,2116,2117],{},"A GameMaker CI pipeline with gm-cli is mostly plain shell commands. The hard part is everything gm-cli assumes about your machine: a recent Node, a browser, a person at the keyboard, a cache that's never half-written. Remove those assumptions one by one and releasing becomes a button.",[11,2119,2120,2121,2126],{},"If you want to see what comes out of this pipeline, the current build of Mokgard is on ",[30,2122,2125],{"href":2123,"rel":2124},"https:\u002F\u002Fironlizardgames.itch.io\u002Fmokgard-1",[68],"itch.io",", on Windows, Linux or straight in your browser.",[23,2128,2130],{"id":2129},"the-complete-gitlab-ciyml","The complete .gitlab-ci.yml",[11,2132,2133,2134,146,2137,146,2140,2142,2143,2147,2148,2150],{},"Here is the whole file, as we run it today. The only changes are generic names (",[47,2135,2136],{},"mygame",[47,2138,2139],{},"MyGame",[47,2141,711],{},") in place of ours. Replace them with your game's names, set the variables from the ",[30,2144,2146],{"href":2145},"#secrets-and-a-manual-trigger","secrets section",", and commit the ",[47,2149,1653],{}," folder next to it.",[278,2152,2154],{"className":280,"code":2153,"language":282,"meta":267,"style":267},"# GameMaker CI pipeline: Windows, Linux and web builds, uploaded to itch.io and GX.games.\n# Runs only when you click \"Run pipeline\" in GitLab.\n#\n# CI\u002FCD variables:\n#   GM_ACCESS_KEY   GameMaker access key (masked)\n#   BUTLER_API_KEY  itch.io API key (masked)\n#   ITCH_GAME       itch.io \"user\u002Fgame\"\n#   GX_STUDIO_ID, GX_GAME_ID  GX.games IDs\n#   GX_AUTH_JSON    File variable with the auth.json of a local `gm-cli gxgames` login (protected)\n\nstages:\n  - build\n  - deploy\n\nvariables:\n  BUILD_DIR: \"build\"\n  GM_CONFIG: \"Build\"\n  GAME_VERSION: \"Beta-0.2.1\"\n  # GameMaker's zip package ignores the executable name option and uses the project name,\n  # so we rename the executable after packaging\n  GAME_EXE_NAME: \"MyGame\"\n\n# ==========================================\n# BUILD: WINDOWS (.ZIP)\n# ==========================================\nbuild_windows:\n  stage: build\n  tags:\n    - saas-windows-medium-amd64\n  variables:\n    OUTPUT_WIN: \"build\u002Fmygame-${GAME_VERSION}-windows.zip\"\n  cache:\n    key: \"gm-cache-v4-windows\"\n    paths:\n      - .gmcache\u002F\n  rules:\n    - if: '$CI_PIPELINE_SOURCE == \"web\"'\n  before_script:\n    - Write-Host \"Setting up Node.js 24 on the Windows runner...\"\n    - |\n      if (!(Test-Path -Path \"$env:TEMP\\node24\\node.exe\")) {\n        Write-Host \"Downloading portable Node 24...\"\n        Invoke-WebRequest -Uri \"https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv24.22.2\u002Fnode-v24.22.2-win-x64.zip\" -OutFile \"$env:TEMP\\node24.zip\"\n        Expand-Archive \"$env:TEMP\\node24.zip\" -DestinationPath \"$env:TEMP\\node-temp\" -Force\n        Move-Item -Path \"$env:TEMP\\node-temp\\node-v24.22.2-win-x64\" -Destination \"$env:TEMP\\node24\" -Force\n      }\n    - '$env:PATH = \"$env:TEMP\\node24;$env:PATH\"'\n    - Write-Host \"Active Node version:\"\n    - node -v\n    # npm fails with ENOENT if these folders don't exist on a fresh runner\n    - |\n      if (!(Test-Path -Path \"$env:APPDATA\\npm\")) { New-Item -ItemType Directory -Path \"$env:APPDATA\\npm\" -Force | Out-Null }\n      if (!(Test-Path -Path \"$env:LOCALAPPDATA\\npm-cache\")) { New-Item -ItemType Directory -Path \"$env:LOCALAPPDATA\\npm-cache\" -Force | Out-Null }\n    # A cache without the license or Igor is half-built: throw it away\n    - |\n      if ((Test-Path -Path \".gmcache\") -and !(Test-Path -Path \".gmcache\\license\") -and !(Test-Path -Path \".gmcache\\igor\")) {\n        Write-Host \"Removing incomplete .gmcache...\"\n        Remove-Item -Recurse -Force .gmcache\n      }\n    # The previous build output travels in the cache and collides with the new one\n    - Remove-Item -Recurse -Force .gmcache\\build-gms2-* -ErrorAction SilentlyContinue\n    - |\n      if ([string]::IsNullOrEmpty($env:GM_ACCESS_KEY)) {\n        Write-Error \"GM_ACCESS_KEY is missing or empty in GitLab CI.\"\n        exit 1\n      }\n    - Write-Host \"Logging in to GameMaker CLI...\"\n    - npx --yes @gamemaker\u002Fgm-cli@latest login $env:GM_ACCESS_KEY\n    # Install the pre-downloaded tools, each into the prefix gm-cli expects (after login)\n    - |\n      if (Test-Path -Path \"gm-tools-cache\") {\n        Write-Host \"Installing local tool packages...\"\n        Get-ChildItem -Path \"gm-tools-cache\\*win-x64*.tgz\" | ForEach-Object {\n          if ($_.Name -like \"*project-tool*\") {\n            npm install --global --prefix .gmcache\\project-tool $_.FullName\n          } elseif ($_.Name -like \"*package-tool*\") {\n            npm install --global --prefix .gmcache\\package-tool $_.FullName\n          } elseif ($_.Name -like \"*gmpm*\") {\n            npm install --global --prefix .gmcache\\gmpm $_.FullName\n          }\n        }\n      }\n  script:\n    - if (!(Test-Path -Path $env:BUILD_DIR)) { New-Item -ItemType Directory -Path $env:BUILD_DIR -Force | Out-Null }\n    - Write-Host \"Compiling and packaging for Windows...\"\n    - npx --yes @gamemaker\u002Fgm-cli@latest package --target=windows --config=$env:GM_CONFIG --output=$env:OUTPUT_WIN --verbose\n    - Expand-Archive $env:OUTPUT_WIN build\\win-tmp -Force\n    - Get-ChildItem build\\win-tmp -Recurse -Filter my_project.exe | Rename-Item -NewName \"$env:GAME_EXE_NAME.exe\"\n    - Remove-Item $env:OUTPUT_WIN\n    # Compress-Archive (PowerShell 5) stores folders that only contain folders as empty files,\n    # and butler rejects the zip. The tar that ships with Windows doesn't.\n    - tar -a -cf $env:OUTPUT_WIN -C build\\win-tmp .\n    - Remove-Item -Recurse -Force build\\win-tmp\n  artifacts:\n    name: \"$CI_PROJECT_NAME-windows-$CI_COMMIT_SHORT_SHA\"\n    paths:\n      - \"build\u002Fmygame-${GAME_VERSION}-windows.zip\"\n    expire_in: 14 days\n\n# ==========================================\n# BUILD: LINUX (.ZIP)\n# AppImage needs \u002Fopt\u002Fsteam-runtime and unshare (a privileged runner). A zip doesn't.\n# ==========================================\nbuild_linux:\n  stage: build\n  image: node:24-bookworm\n  variables:\n    OUTPUT_LINUX: \"build\u002Fmygame-${GAME_VERSION}-linux.zip\"\n  cache:\n    key: \"gm-cache-v4-linux\"\n    paths:\n      - .gmcache\u002F\n  rules:\n    - if: '$CI_PIPELINE_SOURCE == \"web\"'\n  before_script:\n    - apt-get update && apt-get install -y --no-install-recommends ffmpeg zip unzip curl ca-certificates\n    - |\n      if [ -d \".gmcache\" ] && [ ! -d \".gmcache\u002Flicense\" ] && [ ! -d \".gmcache\u002Figor\" ]; then\n        echo \"Removing incomplete .gmcache...\"\n        rm -rf .gmcache\n      fi\n    # The previous build output travels in the cache and collides with the new one\n    - rm -rf .gmcache\u002Fbuild-gms2-*\n    - |\n      if [ -z \"$GM_ACCESS_KEY\" ]; then\n        echo \"GM_ACCESS_KEY is empty in GitLab CI.\"\n        exit 1\n      fi\n    # 1. Log in first: it creates the license and Igor in .gmcache\n    - echo \"Logging in to GameMaker CLI...\"\n    - npx --yes @gamemaker\u002Fgm-cli@latest login \"$GM_ACCESS_KEY\"\n    # 2. Install each tool into the prefix gm-cli expects\n    - |\n      if [ -d \"gm-tools-cache\" ]; then\n        echo \"Installing local tool packages...\"\n        for f in gm-tools-cache\u002F*linux-x64*.tgz; do\n          case \"$f\" in\n            *project-tool*) npm install --global --prefix .gmcache\u002Fproject-tool \".\u002F$f\" ;;\n            *package-tool*) npm install --global --prefix .gmcache\u002Fpackage-tool \".\u002F$f\" ;;\n            *gmpm*)         npm install --global --prefix .gmcache\u002Fgmpm \".\u002F$f\" ;;\n          esac\n        done\n\n        # Linux paths are case-sensitive: add the names and paths gm-cli looks for\n        for tool in project-tool package-tool gmpm; do\n          if [ -d \".gmcache\u002F$tool\u002Flib\u002Fnode_modules\" ] && [ ! -d \".gmcache\u002F$tool\u002Fnode_modules\" ]; then\n            ln -sf lib\u002Fnode_modules \".gmcache\u002F$tool\u002Fnode_modules\"\n          fi\n          if [ -d \".gmcache\u002F$tool\u002Fbin\" ]; then\n            [ -f \".gmcache\u002F$tool\u002Fbin\u002Fprojecttool\" ] && ln -sf projecttool \".gmcache\u002F$tool\u002Fbin\u002FProjectTool\" 2>\u002Fdev\u002Fnull || true\n            [ -f \".gmcache\u002F$tool\u002Fbin\u002Fpackagetool\" ] && ln -sf packagetool \".gmcache\u002F$tool\u002Fbin\u002FPackageTool\" 2>\u002Fdev\u002Fnull || true\n          fi\n        done\n        export PATH=\"$PWD\u002F.gmcache\u002Fproject-tool\u002Fbin:$PWD\u002F.gmcache\u002Fpackage-tool\u002Fbin:$PATH\"\n      fi\n  script:\n    - mkdir -p \"$BUILD_DIR\"\n    - echo \"Compiling and packaging for Linux as a zip...\"\n    - |\n      npx --yes @gamemaker\u002Fgm-cli@latest package \\\n        --target=linux \\\n        --config=\"$GM_CONFIG\" \\\n        --toolchain-options '{\"linux\": {\"packageType\": \"zip\"}}' \\\n        --output=\"$OUTPUT_LINUX\" \\\n        --verbose\n    - mkdir -p build\u002Flinux-tmp && unzip -q \"$OUTPUT_LINUX\" -d build\u002Flinux-tmp\n    - find build\u002Flinux-tmp -type f -name my_project -execdir mv {} \"$GAME_EXE_NAME\" \\;\n    # GameMaker's Linux runner links libssl\u002Flibcrypto 1.0.0, which no current distro ships. It has RPATH=$ORIGIN,\n    # so leaving the .so files next to the executable is enough. They come from Ubuntu 18.04's package\n    # (glibc 2.27, loads on any later distro). OpenSSL 1.0.2 is unsupported: remove this when the runner links a modern version.\n    - |\n      curl -fsSL -o \u002Ftmp\u002Flibssl1.0.deb http:\u002F\u002Farchive.ubuntu.com\u002Fubuntu\u002Fpool\u002Fmain\u002Fo\u002Fopenssl1.0\u002Flibssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb\n      echo \"ed14555671475a2db481049b4b66ecd376f79a7ca6d4d78a1702feb037aa5422  \u002Ftmp\u002Flibssl1.0.deb\" | sha256sum -c -\n      dpkg-deb -x \u002Ftmp\u002Flibssl1.0.deb \u002Ftmp\u002Flibssl1.0\n      GAME_DIR=\"$(dirname \"$(find build\u002Flinux-tmp -type f -name \"$GAME_EXE_NAME\" | head -1)\")\"\n      cp \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibssl.so.1.0.0 \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibcrypto.so.1.0.0 \"$GAME_DIR\u002F\"\n    - rm \"$OUTPUT_LINUX\" && (cd build\u002Flinux-tmp && zip -qry \"$CI_PROJECT_DIR\u002F$OUTPUT_LINUX\" .) && rm -rf build\u002Flinux-tmp\n  artifacts:\n    name: \"$CI_PROJECT_NAME-linux-$CI_COMMIT_SHORT_SHA\"\n    paths:\n      - \"build\u002Fmygame-${GAME_VERSION}-linux.zip\"\n    expire_in: 14 days\n\n# ==========================================\n# DEPLOY: itch.io (butler)\n# html5 channel: the web zip from deploy_gxgames (same wasm runner as GX.games). The first time\n# butler creates the channel, tick \"This file will be played in the browser\" on that upload by\n# hand (and untick it on any other). Later pushes keep the setting.\n# ==========================================\ndeploy_itch:\n  stage: deploy\n  image: debian:bookworm-slim\n  needs: [build_windows, build_linux, deploy_gxgames]\n  rules:\n    - if: '$CI_PIPELINE_SOURCE == \"web\"'\n  before_script:\n    - apt-get update && apt-get install -y --no-install-recommends curl unzip ca-certificates\n    - curl -fsSL -o butler.zip https:\u002F\u002Fbroth.itch.zone\u002Fbutler\u002Flinux-amd64\u002FLATEST\u002Farchive\u002Fdefault\n    - unzip -q butler.zip -d \u002Fusr\u002Flocal\u002Fbin && chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fbutler\n    - butler -V\n  script:\n    - butler push build\u002Fmygame-${GAME_VERSION}-windows.zip \"$ITCH_GAME:windows\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n    - butler push build\u002Fmygame-${GAME_VERSION}-linux.zip \"$ITCH_GAME:linux\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n    # itch.io only starts a browser game if index.html is at the root of the zip (\"Failed to find index.html\")\n    - unzip -l build\u002Fmygame-gx.zip | awk '{print $4}' | grep -qx index.html || { echo \"build\u002Fmygame-gx.zip has no index.html at its root\"; exit 1; }\n    - butler push build\u002Fmygame-gx.zip \"$ITCH_GAME:html5\" --userversion \"$GAME_VERSION+$CI_COMMIT_SHORT_SHA\"\n\n# ==========================================\n# DEPLOY: GX.games (gm-cli gxgames)\n# Reuses the login and tool install from build_linux.\n# Only uploads an internal version: `gxgames meta` and `gxgames publish` were done once by hand.\n# ==========================================\ndeploy_gxgames:\n  extends: build_linux\n  stage: deploy\n  needs: []\n  cache:\n    key: \"gm-cache-v4-gxgames\"\n    paths:\n      - .gmcache\u002F\n  script:\n    - mkdir -p \"$BUILD_DIR\"\n    - |\n      npx --yes @gamemaker\u002Fgm-cli@latest package \\\n        --target=operagx \\\n        --config=\"$GM_CONFIG\" \\\n        --output=build\u002Fmygame-gx.zip \\\n        --verbose\n    # gxgames logs in with OAuth in a browser. In CI we inject the auth.json from a local login\n    # (with CI=true, gm-cli looks for it in .gmcache\u002Fgxgames-auth\u002F). When it expires, gm-cli\n    # renews it with its refreshToken. If the runner cache already has a renewed one, keep it.\n    # If the refreshToken dies, log in locally again and update the variable.\n    - |\n      if [ ! -f .gmcache\u002Fgxgames-auth\u002Fauth.json ]; then\n        if [ -z \"$GX_AUTH_JSON\" ]; then echo \"Missing File variable GX_AUTH_JSON (gxgames auth.json).\"; exit 1; fi\n        mkdir -p .gmcache\u002Fgxgames-auth && cp \"$GX_AUTH_JSON\" .gmcache\u002Fgxgames-auth\u002Fauth.json\n      fi\n    # Without either ID, link opens an interactive picker and the job dies (exit 13)\n    - |\n      if [ -z \"$GX_STUDIO_ID\" ] || [ -z \"$GX_GAME_ID\" ]; then echo \"Missing GX_STUDIO_ID \u002F GX_GAME_ID in the CI variables.\"; exit 1; fi\n    - npx --yes @gamemaker\u002Fgm-cli@latest gxgames link --studioid \"$GX_STUDIO_ID\" --gameid \"$GX_GAME_ID\"\n    # After uploading, gm-cli opens the publish page with xdg-open; without a browser it exits with 1.\n    # A fake xdg-open that only prints the URL.\n    - printf '#!\u002Fbin\u002Fsh\\necho \"xdg-open $*\"\\n' > \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open && chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open\n    # --version is required in CI (without it, gm-cli asks on the keyboard) and must be X.Y.Z.B\n    - npx --yes @gamemaker\u002Fgm-cli@latest gxgames upload --file build\u002Fmygame-gx.zip --version \"0.1.0.$CI_PIPELINE_IID\"\n  artifacts:\n    name: \"$CI_PROJECT_NAME-gx-$CI_COMMIT_SHORT_SHA\"\n    paths:\n      - build\u002Fmygame-gx.zip\n    expire_in: 7 days\n",[47,2155,2156,2161,2166,2171,2176,2181,2186,2191,2196,2201,2207,2214,2220,2226,2230,2237,2250,2263,2277,2282,2287,2300,2304,2309,2314,2318,2324,2332,2339,2346,2353,2368,2375,2389,2396,2403,2411,2426,2433,2441,2448,2454,2460,2466,2472,2478,2484,2496,2504,2512,2518,2525,2531,2537,2543,2550,2556,2562,2568,2573,2579,2587,2594,2600,2606,2612,2617,2625,2633,2639,2646,2652,2658,2664,2670,2676,2682,2688,2694,2700,2706,2712,2717,2724,2732,2740,2748,2756,2764,2772,2778,2784,2792,2800,2807,2822,2829,2840,2849,2854,2859,2865,2871,2876,2883,2892,2901,2908,2921,2928,2941,2948,2955,2962,2977,2984,2991,2998,3004,3010,3016,3022,3027,3035,3042,3048,3054,3059,3064,3070,3078,3085,3091,3098,3104,3110,3116,3122,3128,3134,3140,3146,3152,3157,3163,3169,3175,3181,3187,3193,3199,3205,3210,3215,3221,3226,3233,3241,3249,3256,3261,3266,3271,3276,3281,3286,3294,3302,3308,3314,3320,3327,3333,3339,3345,3351,3357,3365,3372,3386,3393,3404,3413,3418,3423,3429,3435,3441,3447,3452,3459,3468,3477,3498,3505,3520,3527,3534,3541,3548,3556,3563,3570,3577,3583,3591,3598,3603,3608,3614,3620,3626,3631,3638,3649,3658,3668,3675,3689,3696,3703,3710,3717,3724,3729,3735,3740,3746,3751,3757,3763,3769,3775,3782,3788,3794,3800,3805,3811,3818,3824,3832,3838,3844,3852,3858,3866,3873,3887,3894,3902],{"__ignoreMap":267},[286,2157,2158],{"class":288,"line":289},[286,2159,2160],{"class":479},"# GameMaker CI pipeline: Windows, Linux and web builds, uploaded to itch.io and GX.games.\n",[286,2162,2163],{"class":288,"line":300},[286,2164,2165],{"class":479},"# Runs only when you click \"Run pipeline\" in GitLab.\n",[286,2167,2168],{"class":288,"line":427},[286,2169,2170],{"class":479},"#\n",[286,2172,2173],{"class":288,"line":438},[286,2174,2175],{"class":479},"# CI\u002FCD variables:\n",[286,2177,2178],{"class":288,"line":446},[286,2179,2180],{"class":479},"#   GM_ACCESS_KEY   GameMaker access key (masked)\n",[286,2182,2183],{"class":288,"line":463},[286,2184,2185],{"class":479},"#   BUTLER_API_KEY  itch.io API key (masked)\n",[286,2187,2188],{"class":288,"line":483},[286,2189,2190],{"class":479},"#   ITCH_GAME       itch.io \"user\u002Fgame\"\n",[286,2192,2193],{"class":288,"line":491},[286,2194,2195],{"class":479},"#   GX_STUDIO_ID, GX_GAME_ID  GX.games IDs\n",[286,2197,2198],{"class":288,"line":506},[286,2199,2200],{"class":479},"#   GX_AUTH_JSON    File variable with the auth.json of a local `gm-cli gxgames` login (protected)\n",[286,2202,2203],{"class":288,"line":514},[286,2204,2206],{"emptyLinePlaceholder":2205},true,"\n",[286,2208,2209,2212],{"class":288,"line":523},[286,2210,2211],{"class":292},"stages",[286,2213,297],{"class":296},[286,2215,2216,2218],{"class":288,"line":531},[286,2217,303],{"class":296},[286,2219,424],{"class":315},[286,2221,2222,2224],{"class":288,"line":540},[286,2223,303],{"class":296},[286,2225,1704],{"class":315},[286,2227,2228],{"class":288,"line":551},[286,2229,2206],{"emptyLinePlaceholder":2205},[286,2231,2232,2235],{"class":288,"line":559},[286,2233,2234],{"class":292},"variables",[286,2236,297],{"class":296},[286,2238,2239,2242,2244,2246,2248],{"class":288,"line":567},[286,2240,2241],{"class":292},"  BUILD_DIR",[286,2243,309],{"class":296},[286,2245,454],{"class":296},[286,2247,196],{"class":315},[286,2249,460],{"class":296},[286,2251,2252,2255,2257,2259,2261],{"class":288,"line":575},[286,2253,2254],{"class":292},"  GM_CONFIG",[286,2256,309],{"class":296},[286,2258,454],{"class":296},[286,2260,457],{"class":315},[286,2262,460],{"class":296},[286,2264,2265,2268,2270,2272,2275],{"class":288,"line":584},[286,2266,2267],{"class":292},"  GAME_VERSION",[286,2269,309],{"class":296},[286,2271,454],{"class":296},[286,2273,2274],{"class":315},"Beta-0.2.1",[286,2276,460],{"class":296},[286,2278,2279],{"class":288,"line":590},[286,2280,2281],{"class":479},"  # GameMaker's zip package ignores the executable name option and uses the project name,\n",[286,2283,2284],{"class":288,"line":596},[286,2285,2286],{"class":479},"  # so we rename the executable after packaging\n",[286,2288,2289,2292,2294,2296,2298],{"class":288,"line":602},[286,2290,2291],{"class":292},"  GAME_EXE_NAME",[286,2293,309],{"class":296},[286,2295,454],{"class":296},[286,2297,2139],{"class":315},[286,2299,460],{"class":296},[286,2301,2302],{"class":288,"line":608},[286,2303,2206],{"emptyLinePlaceholder":2205},[286,2305,2306],{"class":288,"line":614},[286,2307,2308],{"class":479},"# ==========================================\n",[286,2310,2311],{"class":288,"line":620},[286,2312,2313],{"class":479},"# BUILD: WINDOWS (.ZIP)\n",[286,2315,2316],{"class":288,"line":628},[286,2317,2308],{"class":479},[286,2319,2320,2322],{"class":288,"line":635},[286,2321,193],{"class":292},[286,2323,297],{"class":296},[286,2325,2326,2328,2330],{"class":288,"line":646},[286,2327,419],{"class":292},[286,2329,309],{"class":296},[286,2331,424],{"class":315},[286,2333,2335,2337],{"class":288,"line":2334},28,[286,2336,1074],{"class":292},[286,2338,297],{"class":296},[286,2340,2342,2344],{"class":288,"line":2341},29,[286,2343,534],{"class":296},[286,2345,1083],{"class":315},[286,2347,2349,2351],{"class":288,"line":2348},30,[286,2350,441],{"class":292},[286,2352,297],{"class":296},[286,2354,2356,2359,2361,2363,2366],{"class":288,"line":2355},31,[286,2357,2358],{"class":292},"    OUTPUT_WIN",[286,2360,309],{"class":296},[286,2362,454],{"class":296},[286,2364,2365],{"class":315},"build\u002Fmygame-${GAME_VERSION}-windows.zip",[286,2367,460],{"class":296},[286,2369,2371,2373],{"class":288,"line":2370},32,[286,2372,486],{"class":292},[286,2374,297],{"class":296},[286,2376,2378,2380,2382,2384,2387],{"class":288,"line":2377},33,[286,2379,494],{"class":292},[286,2381,309],{"class":296},[286,2383,454],{"class":296},[286,2385,2386],{"class":315},"gm-cache-v4-windows",[286,2388,460],{"class":296},[286,2390,2392,2394],{"class":288,"line":2391},34,[286,2393,509],{"class":292},[286,2395,297],{"class":296},[286,2397,2399,2401],{"class":288,"line":2398},35,[286,2400,517],{"class":296},[286,2402,520],{"class":315},[286,2404,2406,2409],{"class":288,"line":2405},36,[286,2407,2408],{"class":292},"  rules",[286,2410,297],{"class":296},[286,2412,2414,2416,2418,2420,2422,2424],{"class":288,"line":2413},37,[286,2415,534],{"class":296},[286,2417,306],{"class":292},[286,2419,309],{"class":296},[286,2421,312],{"class":296},[286,2423,316],{"class":315},[286,2425,319],{"class":296},[286,2427,2429,2431],{"class":288,"line":2428},38,[286,2430,526],{"class":292},[286,2432,297],{"class":296},[286,2434,2436,2438],{"class":288,"line":2435},39,[286,2437,534],{"class":296},[286,2439,2440],{"class":315}," Write-Host \"Setting up Node.js 24 on the Windows runner...\"\n",[286,2442,2444,2446],{"class":288,"line":2443},40,[286,2445,534],{"class":296},[286,2447,581],{"class":580},[286,2449,2451],{"class":288,"line":2450},41,[286,2452,2453],{"class":315},"      if (!(Test-Path -Path \"$env:TEMP\\node24\\node.exe\")) {\n",[286,2455,2457],{"class":288,"line":2456},42,[286,2458,2459],{"class":315},"        Write-Host \"Downloading portable Node 24...\"\n",[286,2461,2463],{"class":288,"line":2462},43,[286,2464,2465],{"class":315},"        Invoke-WebRequest -Uri \"https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv24.22.2\u002Fnode-v24.22.2-win-x64.zip\" -OutFile \"$env:TEMP\\node24.zip\"\n",[286,2467,2469],{"class":288,"line":2468},44,[286,2470,2471],{"class":315},"        Expand-Archive \"$env:TEMP\\node24.zip\" -DestinationPath \"$env:TEMP\\node-temp\" -Force\n",[286,2473,2475],{"class":288,"line":2474},45,[286,2476,2477],{"class":315},"        Move-Item -Path \"$env:TEMP\\node-temp\\node-v24.22.2-win-x64\" -Destination \"$env:TEMP\\node24\" -Force\n",[286,2479,2481],{"class":288,"line":2480},46,[286,2482,2483],{"class":315},"      }\n",[286,2485,2487,2489,2491,2494],{"class":288,"line":2486},47,[286,2488,534],{"class":296},[286,2490,312],{"class":296},[286,2492,2493],{"class":315},"$env:PATH = \"$env:TEMP\\node24;$env:PATH\"",[286,2495,319],{"class":296},[286,2497,2499,2501],{"class":288,"line":2498},48,[286,2500,534],{"class":296},[286,2502,2503],{"class":315}," Write-Host \"Active Node version:\"\n",[286,2505,2507,2509],{"class":288,"line":2506},49,[286,2508,534],{"class":296},[286,2510,2511],{"class":315}," node -v\n",[286,2513,2515],{"class":288,"line":2514},50,[286,2516,2517],{"class":479},"    # npm fails with ENOENT if these folders don't exist on a fresh runner\n",[286,2519,2521,2523],{"class":288,"line":2520},51,[286,2522,534],{"class":296},[286,2524,581],{"class":580},[286,2526,2528],{"class":288,"line":2527},52,[286,2529,2530],{"class":315},"      if (!(Test-Path -Path \"$env:APPDATA\\npm\")) { New-Item -ItemType Directory -Path \"$env:APPDATA\\npm\" -Force | Out-Null }\n",[286,2532,2534],{"class":288,"line":2533},53,[286,2535,2536],{"class":315},"      if (!(Test-Path -Path \"$env:LOCALAPPDATA\\npm-cache\")) { New-Item -ItemType Directory -Path \"$env:LOCALAPPDATA\\npm-cache\" -Force | Out-Null }\n",[286,2538,2540],{"class":288,"line":2539},54,[286,2541,2542],{"class":479},"    # A cache without the license or Igor is half-built: throw it away\n",[286,2544,2546,2548],{"class":288,"line":2545},55,[286,2547,534],{"class":296},[286,2549,581],{"class":580},[286,2551,2553],{"class":288,"line":2552},56,[286,2554,2555],{"class":315},"      if ((Test-Path -Path \".gmcache\") -and !(Test-Path -Path \".gmcache\\license\") -and !(Test-Path -Path \".gmcache\\igor\")) {\n",[286,2557,2559],{"class":288,"line":2558},57,[286,2560,2561],{"class":315},"        Write-Host \"Removing incomplete .gmcache...\"\n",[286,2563,2565],{"class":288,"line":2564},58,[286,2566,2567],{"class":315},"        Remove-Item -Recurse -Force .gmcache\n",[286,2569,2571],{"class":288,"line":2570},59,[286,2572,2483],{"class":315},[286,2574,2576],{"class":288,"line":2575},60,[286,2577,2578],{"class":479},"    # The previous build output travels in the cache and collides with the new one\n",[286,2580,2582,2584],{"class":288,"line":2581},61,[286,2583,534],{"class":296},[286,2585,2586],{"class":315}," Remove-Item -Recurse -Force .gmcache\\build-gms2-* -ErrorAction SilentlyContinue\n",[286,2588,2590,2592],{"class":288,"line":2589},62,[286,2591,534],{"class":296},[286,2593,581],{"class":580},[286,2595,2597],{"class":288,"line":2596},63,[286,2598,2599],{"class":315},"      if ([string]::IsNullOrEmpty($env:GM_ACCESS_KEY)) {\n",[286,2601,2603],{"class":288,"line":2602},64,[286,2604,2605],{"class":315},"        Write-Error \"GM_ACCESS_KEY is missing or empty in GitLab CI.\"\n",[286,2607,2609],{"class":288,"line":2608},65,[286,2610,2611],{"class":315},"        exit 1\n",[286,2613,2615],{"class":288,"line":2614},66,[286,2616,2483],{"class":315},[286,2618,2620,2622],{"class":288,"line":2619},67,[286,2621,534],{"class":296},[286,2623,2624],{"class":315}," Write-Host \"Logging in to GameMaker CLI...\"\n",[286,2626,2628,2630],{"class":288,"line":2627},68,[286,2629,534],{"class":296},[286,2631,2632],{"class":315}," npx --yes @gamemaker\u002Fgm-cli@latest login $env:GM_ACCESS_KEY\n",[286,2634,2636],{"class":288,"line":2635},69,[286,2637,2638],{"class":479},"    # Install the pre-downloaded tools, each into the prefix gm-cli expects (after login)\n",[286,2640,2642,2644],{"class":288,"line":2641},70,[286,2643,534],{"class":296},[286,2645,581],{"class":580},[286,2647,2649],{"class":288,"line":2648},71,[286,2650,2651],{"class":315},"      if (Test-Path -Path \"gm-tools-cache\") {\n",[286,2653,2655],{"class":288,"line":2654},72,[286,2656,2657],{"class":315},"        Write-Host \"Installing local tool packages...\"\n",[286,2659,2661],{"class":288,"line":2660},73,[286,2662,2663],{"class":315},"        Get-ChildItem -Path \"gm-tools-cache\\*win-x64*.tgz\" | ForEach-Object {\n",[286,2665,2667],{"class":288,"line":2666},74,[286,2668,2669],{"class":315},"          if ($_.Name -like \"*project-tool*\") {\n",[286,2671,2673],{"class":288,"line":2672},75,[286,2674,2675],{"class":315},"            npm install --global --prefix .gmcache\\project-tool $_.FullName\n",[286,2677,2679],{"class":288,"line":2678},76,[286,2680,2681],{"class":315},"          } elseif ($_.Name -like \"*package-tool*\") {\n",[286,2683,2685],{"class":288,"line":2684},77,[286,2686,2687],{"class":315},"            npm install --global --prefix .gmcache\\package-tool $_.FullName\n",[286,2689,2691],{"class":288,"line":2690},78,[286,2692,2693],{"class":315},"          } elseif ($_.Name -like \"*gmpm*\") {\n",[286,2695,2697],{"class":288,"line":2696},79,[286,2698,2699],{"class":315},"            npm install --global --prefix .gmcache\\gmpm $_.FullName\n",[286,2701,2703],{"class":288,"line":2702},80,[286,2704,2705],{"class":315},"          }\n",[286,2707,2709],{"class":288,"line":2708},81,[286,2710,2711],{"class":315},"        }\n",[286,2713,2715],{"class":288,"line":2714},82,[286,2716,2483],{"class":315},[286,2718,2720,2722],{"class":288,"line":2719},83,[286,2721,562],{"class":292},[286,2723,297],{"class":296},[286,2725,2727,2729],{"class":288,"line":2726},84,[286,2728,534],{"class":296},[286,2730,2731],{"class":315}," if (!(Test-Path -Path $env:BUILD_DIR)) { New-Item -ItemType Directory -Path $env:BUILD_DIR -Force | Out-Null }\n",[286,2733,2735,2737],{"class":288,"line":2734},85,[286,2736,534],{"class":296},[286,2738,2739],{"class":315}," Write-Host \"Compiling and packaging for Windows...\"\n",[286,2741,2743,2745],{"class":288,"line":2742},86,[286,2744,534],{"class":296},[286,2746,2747],{"class":315}," npx --yes @gamemaker\u002Fgm-cli@latest package --target=windows --config=$env:GM_CONFIG --output=$env:OUTPUT_WIN --verbose\n",[286,2749,2751,2753],{"class":288,"line":2750},87,[286,2752,534],{"class":296},[286,2754,2755],{"class":315}," Expand-Archive $env:OUTPUT_WIN build\\win-tmp -Force\n",[286,2757,2759,2761],{"class":288,"line":2758},88,[286,2760,534],{"class":296},[286,2762,2763],{"class":315}," Get-ChildItem build\\win-tmp -Recurse -Filter my_project.exe | Rename-Item -NewName \"$env:GAME_EXE_NAME.exe\"\n",[286,2765,2767,2769],{"class":288,"line":2766},89,[286,2768,534],{"class":296},[286,2770,2771],{"class":315}," Remove-Item $env:OUTPUT_WIN\n",[286,2773,2775],{"class":288,"line":2774},90,[286,2776,2777],{"class":479},"    # Compress-Archive (PowerShell 5) stores folders that only contain folders as empty files,\n",[286,2779,2781],{"class":288,"line":2780},91,[286,2782,2783],{"class":479},"    # and butler rejects the zip. The tar that ships with Windows doesn't.\n",[286,2785,2787,2789],{"class":288,"line":2786},92,[286,2788,534],{"class":296},[286,2790,2791],{"class":315}," tar -a -cf $env:OUTPUT_WIN -C build\\win-tmp .\n",[286,2793,2795,2797],{"class":288,"line":2794},93,[286,2796,534],{"class":296},[286,2798,2799],{"class":315}," Remove-Item -Recurse -Force build\\win-tmp\n",[286,2801,2803,2805],{"class":288,"line":2802},94,[286,2804,623],{"class":292},[286,2806,297],{"class":296},[286,2808,2810,2813,2815,2817,2820],{"class":288,"line":2809},95,[286,2811,2812],{"class":292},"    name",[286,2814,309],{"class":296},[286,2816,454],{"class":296},[286,2818,2819],{"class":315},"$CI_PROJECT_NAME-windows-$CI_COMMIT_SHORT_SHA",[286,2821,460],{"class":296},[286,2823,2825,2827],{"class":288,"line":2824},96,[286,2826,509],{"class":292},[286,2828,297],{"class":296},[286,2830,2832,2834,2836,2838],{"class":288,"line":2831},97,[286,2833,517],{"class":296},[286,2835,454],{"class":296},[286,2837,2365],{"class":315},[286,2839,460],{"class":296},[286,2841,2843,2845,2847],{"class":288,"line":2842},98,[286,2844,649],{"class":292},[286,2846,309],{"class":296},[286,2848,654],{"class":315},[286,2850,2852],{"class":288,"line":2851},99,[286,2853,2206],{"emptyLinePlaceholder":2205},[286,2855,2857],{"class":288,"line":2856},100,[286,2858,2308],{"class":479},[286,2860,2862],{"class":288,"line":2861},101,[286,2863,2864],{"class":479},"# BUILD: LINUX (.ZIP)\n",[286,2866,2868],{"class":288,"line":2867},102,[286,2869,2870],{"class":479},"# AppImage needs \u002Fopt\u002Fsteam-runtime and unshare (a privileged runner). A zip doesn't.\n",[286,2872,2874],{"class":288,"line":2873},103,[286,2875,2308],{"class":479},[286,2877,2879,2881],{"class":288,"line":2878},104,[286,2880,209],{"class":292},[286,2882,297],{"class":296},[286,2884,2886,2888,2890],{"class":288,"line":2885},105,[286,2887,419],{"class":292},[286,2889,309],{"class":296},[286,2891,424],{"class":315},[286,2893,2895,2897,2899],{"class":288,"line":2894},106,[286,2896,430],{"class":292},[286,2898,309],{"class":296},[286,2900,435],{"class":315},[286,2902,2904,2906],{"class":288,"line":2903},107,[286,2905,441],{"class":292},[286,2907,297],{"class":296},[286,2909,2911,2913,2915,2917,2919],{"class":288,"line":2910},108,[286,2912,466],{"class":292},[286,2914,309],{"class":296},[286,2916,454],{"class":296},[286,2918,473],{"class":315},[286,2920,460],{"class":296},[286,2922,2924,2926],{"class":288,"line":2923},109,[286,2925,486],{"class":292},[286,2927,297],{"class":296},[286,2929,2931,2933,2935,2937,2939],{"class":288,"line":2930},110,[286,2932,494],{"class":292},[286,2934,309],{"class":296},[286,2936,454],{"class":296},[286,2938,501],{"class":315},[286,2940,460],{"class":296},[286,2942,2944,2946],{"class":288,"line":2943},111,[286,2945,509],{"class":292},[286,2947,297],{"class":296},[286,2949,2951,2953],{"class":288,"line":2950},112,[286,2952,517],{"class":296},[286,2954,520],{"class":315},[286,2956,2958,2960],{"class":288,"line":2957},113,[286,2959,2408],{"class":292},[286,2961,297],{"class":296},[286,2963,2965,2967,2969,2971,2973,2975],{"class":288,"line":2964},114,[286,2966,534],{"class":296},[286,2968,306],{"class":292},[286,2970,309],{"class":296},[286,2972,312],{"class":296},[286,2974,316],{"class":315},[286,2976,319],{"class":296},[286,2978,2980,2982],{"class":288,"line":2979},115,[286,2981,526],{"class":292},[286,2983,297],{"class":296},[286,2985,2987,2989],{"class":288,"line":2986},116,[286,2988,534],{"class":296},[286,2990,537],{"class":315},[286,2992,2994,2996],{"class":288,"line":2993},117,[286,2995,534],{"class":296},[286,2997,581],{"class":580},[286,2999,3001],{"class":288,"line":3000},118,[286,3002,3003],{"class":315},"      if [ -d \".gmcache\" ] && [ ! -d \".gmcache\u002Flicense\" ] && [ ! -d \".gmcache\u002Figor\" ]; then\n",[286,3005,3007],{"class":288,"line":3006},119,[286,3008,3009],{"class":315},"        echo \"Removing incomplete .gmcache...\"\n",[286,3011,3013],{"class":288,"line":3012},120,[286,3014,3015],{"class":315},"        rm -rf .gmcache\n",[286,3017,3019],{"class":288,"line":3018},121,[286,3020,3021],{"class":315},"      fi\n",[286,3023,3025],{"class":288,"line":3024},122,[286,3026,2578],{"class":479},[286,3028,3030,3032],{"class":288,"line":3029},123,[286,3031,534],{"class":296},[286,3033,3034],{"class":315}," rm -rf .gmcache\u002Fbuild-gms2-*\n",[286,3036,3038,3040],{"class":288,"line":3037},124,[286,3039,534],{"class":296},[286,3041,581],{"class":580},[286,3043,3045],{"class":288,"line":3044},125,[286,3046,3047],{"class":315},"      if [ -z \"$GM_ACCESS_KEY\" ]; then\n",[286,3049,3051],{"class":288,"line":3050},126,[286,3052,3053],{"class":315},"        echo \"GM_ACCESS_KEY is empty in GitLab CI.\"\n",[286,3055,3057],{"class":288,"line":3056},127,[286,3058,2611],{"class":315},[286,3060,3062],{"class":288,"line":3061},128,[286,3063,3021],{"class":315},[286,3065,3067],{"class":288,"line":3066},129,[286,3068,3069],{"class":479},"    # 1. Log in first: it creates the license and Igor in .gmcache\n",[286,3071,3073,3075],{"class":288,"line":3072},130,[286,3074,534],{"class":296},[286,3076,3077],{"class":315}," echo \"Logging in to GameMaker CLI...\"\n",[286,3079,3081,3083],{"class":288,"line":3080},131,[286,3082,534],{"class":296},[286,3084,556],{"class":315},[286,3086,3088],{"class":288,"line":3087},132,[286,3089,3090],{"class":479},"    # 2. Install each tool into the prefix gm-cli expects\n",[286,3092,3094,3096],{"class":288,"line":3093},133,[286,3095,534],{"class":296},[286,3097,581],{"class":580},[286,3099,3101],{"class":288,"line":3100},134,[286,3102,3103],{"class":315},"      if [ -d \"gm-tools-cache\" ]; then\n",[286,3105,3107],{"class":288,"line":3106},135,[286,3108,3109],{"class":315},"        echo \"Installing local tool packages...\"\n",[286,3111,3113],{"class":288,"line":3112},136,[286,3114,3115],{"class":315},"        for f in gm-tools-cache\u002F*linux-x64*.tgz; do\n",[286,3117,3119],{"class":288,"line":3118},137,[286,3120,3121],{"class":315},"          case \"$f\" in\n",[286,3123,3125],{"class":288,"line":3124},138,[286,3126,3127],{"class":315},"            *project-tool*) npm install --global --prefix .gmcache\u002Fproject-tool \".\u002F$f\" ;;\n",[286,3129,3131],{"class":288,"line":3130},139,[286,3132,3133],{"class":315},"            *package-tool*) npm install --global --prefix .gmcache\u002Fpackage-tool \".\u002F$f\" ;;\n",[286,3135,3137],{"class":288,"line":3136},140,[286,3138,3139],{"class":315},"            *gmpm*)         npm install --global --prefix .gmcache\u002Fgmpm \".\u002F$f\" ;;\n",[286,3141,3143],{"class":288,"line":3142},141,[286,3144,3145],{"class":315},"          esac\n",[286,3147,3149],{"class":288,"line":3148},142,[286,3150,3151],{"class":315},"        done\n",[286,3153,3155],{"class":288,"line":3154},143,[286,3156,2206],{"emptyLinePlaceholder":2205},[286,3158,3160],{"class":288,"line":3159},144,[286,3161,3162],{"class":315},"        # Linux paths are case-sensitive: add the names and paths gm-cli looks for\n",[286,3164,3166],{"class":288,"line":3165},145,[286,3167,3168],{"class":315},"        for tool in project-tool package-tool gmpm; do\n",[286,3170,3172],{"class":288,"line":3171},146,[286,3173,3174],{"class":315},"          if [ -d \".gmcache\u002F$tool\u002Flib\u002Fnode_modules\" ] && [ ! -d \".gmcache\u002F$tool\u002Fnode_modules\" ]; then\n",[286,3176,3178],{"class":288,"line":3177},147,[286,3179,3180],{"class":315},"            ln -sf lib\u002Fnode_modules \".gmcache\u002F$tool\u002Fnode_modules\"\n",[286,3182,3184],{"class":288,"line":3183},148,[286,3185,3186],{"class":315},"          fi\n",[286,3188,3190],{"class":288,"line":3189},149,[286,3191,3192],{"class":315},"          if [ -d \".gmcache\u002F$tool\u002Fbin\" ]; then\n",[286,3194,3196],{"class":288,"line":3195},150,[286,3197,3198],{"class":315},"            [ -f \".gmcache\u002F$tool\u002Fbin\u002Fprojecttool\" ] && ln -sf projecttool \".gmcache\u002F$tool\u002Fbin\u002FProjectTool\" 2>\u002Fdev\u002Fnull || true\n",[286,3200,3202],{"class":288,"line":3201},151,[286,3203,3204],{"class":315},"            [ -f \".gmcache\u002F$tool\u002Fbin\u002Fpackagetool\" ] && ln -sf packagetool \".gmcache\u002F$tool\u002Fbin\u002FPackageTool\" 2>\u002Fdev\u002Fnull || true\n",[286,3206,3208],{"class":288,"line":3207},152,[286,3209,3186],{"class":315},[286,3211,3213],{"class":288,"line":3212},153,[286,3214,3151],{"class":315},[286,3216,3218],{"class":288,"line":3217},154,[286,3219,3220],{"class":315},"        export PATH=\"$PWD\u002F.gmcache\u002Fproject-tool\u002Fbin:$PWD\u002F.gmcache\u002Fpackage-tool\u002Fbin:$PATH\"\n",[286,3222,3224],{"class":288,"line":3223},155,[286,3225,3021],{"class":315},[286,3227,3229,3231],{"class":288,"line":3228},156,[286,3230,562],{"class":292},[286,3232,297],{"class":296},[286,3234,3236,3238],{"class":288,"line":3235},157,[286,3237,534],{"class":296},[286,3239,3240],{"class":315}," mkdir -p \"$BUILD_DIR\"\n",[286,3242,3244,3246],{"class":288,"line":3243},158,[286,3245,534],{"class":296},[286,3247,3248],{"class":315}," echo \"Compiling and packaging for Linux as a zip...\"\n",[286,3250,3252,3254],{"class":288,"line":3251},159,[286,3253,534],{"class":296},[286,3255,581],{"class":580},[286,3257,3259],{"class":288,"line":3258},160,[286,3260,587],{"class":315},[286,3262,3264],{"class":288,"line":3263},161,[286,3265,593],{"class":315},[286,3267,3269],{"class":288,"line":3268},162,[286,3270,599],{"class":315},[286,3272,3274],{"class":288,"line":3273},163,[286,3275,605],{"class":315},[286,3277,3279],{"class":288,"line":3278},164,[286,3280,611],{"class":315},[286,3282,3284],{"class":288,"line":3283},165,[286,3285,617],{"class":315},[286,3287,3289,3291],{"class":288,"line":3288},166,[286,3290,534],{"class":296},[286,3292,3293],{"class":315}," mkdir -p build\u002Flinux-tmp && unzip -q \"$OUTPUT_LINUX\" -d build\u002Flinux-tmp\n",[286,3295,3297,3299],{"class":288,"line":3296},167,[286,3298,534],{"class":296},[286,3300,3301],{"class":315}," find build\u002Flinux-tmp -type f -name my_project -execdir mv {} \"$GAME_EXE_NAME\" \\;\n",[286,3303,3305],{"class":288,"line":3304},168,[286,3306,3307],{"class":479},"    # GameMaker's Linux runner links libssl\u002Flibcrypto 1.0.0, which no current distro ships. It has RPATH=$ORIGIN,\n",[286,3309,3311],{"class":288,"line":3310},169,[286,3312,3313],{"class":479},"    # so leaving the .so files next to the executable is enough. They come from Ubuntu 18.04's package\n",[286,3315,3317],{"class":288,"line":3316},170,[286,3318,3319],{"class":479},"    # (glibc 2.27, loads on any later distro). OpenSSL 1.0.2 is unsupported: remove this when the runner links a modern version.\n",[286,3321,3323,3325],{"class":288,"line":3322},171,[286,3324,534],{"class":296},[286,3326,581],{"class":580},[286,3328,3330],{"class":288,"line":3329},172,[286,3331,3332],{"class":315},"      curl -fsSL -o \u002Ftmp\u002Flibssl1.0.deb http:\u002F\u002Farchive.ubuntu.com\u002Fubuntu\u002Fpool\u002Fmain\u002Fo\u002Fopenssl1.0\u002Flibssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb\n",[286,3334,3336],{"class":288,"line":3335},173,[286,3337,3338],{"class":315},"      echo \"ed14555671475a2db481049b4b66ecd376f79a7ca6d4d78a1702feb037aa5422  \u002Ftmp\u002Flibssl1.0.deb\" | sha256sum -c -\n",[286,3340,3342],{"class":288,"line":3341},174,[286,3343,3344],{"class":315},"      dpkg-deb -x \u002Ftmp\u002Flibssl1.0.deb \u002Ftmp\u002Flibssl1.0\n",[286,3346,3348],{"class":288,"line":3347},175,[286,3349,3350],{"class":315},"      GAME_DIR=\"$(dirname \"$(find build\u002Flinux-tmp -type f -name \"$GAME_EXE_NAME\" | head -1)\")\"\n",[286,3352,3354],{"class":288,"line":3353},176,[286,3355,3356],{"class":315},"      cp \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibssl.so.1.0.0 \u002Ftmp\u002Flibssl1.0\u002Fusr\u002Flib\u002Fx86_64-linux-gnu\u002Flibcrypto.so.1.0.0 \"$GAME_DIR\u002F\"\n",[286,3358,3360,3362],{"class":288,"line":3359},177,[286,3361,534],{"class":296},[286,3363,3364],{"class":315}," rm \"$OUTPUT_LINUX\" && (cd build\u002Flinux-tmp && zip -qry \"$CI_PROJECT_DIR\u002F$OUTPUT_LINUX\" .) && rm -rf build\u002Flinux-tmp\n",[286,3366,3368,3370],{"class":288,"line":3367},178,[286,3369,623],{"class":292},[286,3371,297],{"class":296},[286,3373,3375,3377,3379,3381,3384],{"class":288,"line":3374},179,[286,3376,2812],{"class":292},[286,3378,309],{"class":296},[286,3380,454],{"class":296},[286,3382,3383],{"class":315},"$CI_PROJECT_NAME-linux-$CI_COMMIT_SHORT_SHA",[286,3385,460],{"class":296},[286,3387,3389,3391],{"class":288,"line":3388},180,[286,3390,509],{"class":292},[286,3392,297],{"class":296},[286,3394,3396,3398,3400,3402],{"class":288,"line":3395},181,[286,3397,517],{"class":296},[286,3399,454],{"class":296},[286,3401,473],{"class":315},[286,3403,460],{"class":296},[286,3405,3407,3409,3411],{"class":288,"line":3406},182,[286,3408,649],{"class":292},[286,3410,309],{"class":296},[286,3412,654],{"class":315},[286,3414,3416],{"class":288,"line":3415},183,[286,3417,2206],{"emptyLinePlaceholder":2205},[286,3419,3421],{"class":288,"line":3420},184,[286,3422,2308],{"class":479},[286,3424,3426],{"class":288,"line":3425},185,[286,3427,3428],{"class":479},"# DEPLOY: itch.io (butler)\n",[286,3430,3432],{"class":288,"line":3431},186,[286,3433,3434],{"class":479},"# html5 channel: the web zip from deploy_gxgames (same wasm runner as GX.games). The first time\n",[286,3436,3438],{"class":288,"line":3437},187,[286,3439,3440],{"class":479},"# butler creates the channel, tick \"This file will be played in the browser\" on that upload by\n",[286,3442,3444],{"class":288,"line":3443},188,[286,3445,3446],{"class":479},"# hand (and untick it on any other). Later pushes keep the setting.\n",[286,3448,3450],{"class":288,"line":3449},189,[286,3451,2308],{"class":479},[286,3453,3455,3457],{"class":288,"line":3454},190,[286,3456,244],{"class":292},[286,3458,297],{"class":296},[286,3460,3462,3464,3466],{"class":288,"line":3461},191,[286,3463,419],{"class":292},[286,3465,309],{"class":296},[286,3467,1704],{"class":315},[286,3469,3471,3473,3475],{"class":288,"line":3470},192,[286,3472,430],{"class":292},[286,3474,309],{"class":296},[286,3476,1713],{"class":315},[286,3478,3480,3482,3484,3486,3488,3490,3492,3494,3496],{"class":288,"line":3479},193,[286,3481,1718],{"class":292},[286,3483,309],{"class":296},[286,3485,1234],{"class":296},[286,3487,193],{"class":315},[286,3489,1727],{"class":296},[286,3491,1730],{"class":315},[286,3493,1727],{"class":296},[286,3495,1735],{"class":315},[286,3497,1738],{"class":296},[286,3499,3501,3503],{"class":288,"line":3500},194,[286,3502,2408],{"class":292},[286,3504,297],{"class":296},[286,3506,3508,3510,3512,3514,3516,3518],{"class":288,"line":3507},195,[286,3509,534],{"class":296},[286,3511,306],{"class":292},[286,3513,309],{"class":296},[286,3515,312],{"class":296},[286,3517,316],{"class":315},[286,3519,319],{"class":296},[286,3521,3523,3525],{"class":288,"line":3522},196,[286,3524,526],{"class":292},[286,3526,297],{"class":296},[286,3528,3530,3532],{"class":288,"line":3529},197,[286,3531,534],{"class":296},[286,3533,1751],{"class":315},[286,3535,3537,3539],{"class":288,"line":3536},198,[286,3538,534],{"class":296},[286,3540,1758],{"class":315},[286,3542,3544,3546],{"class":288,"line":3543},199,[286,3545,534],{"class":296},[286,3547,1765],{"class":315},[286,3549,3551,3553],{"class":288,"line":3550},200,[286,3552,534],{"class":296},[286,3554,3555],{"class":315}," butler -V\n",[286,3557,3559,3561],{"class":288,"line":3558},201,[286,3560,562],{"class":292},[286,3562,297],{"class":296},[286,3564,3566,3568],{"class":288,"line":3565},202,[286,3567,534],{"class":296},[286,3569,1778],{"class":315},[286,3571,3573,3575],{"class":288,"line":3572},203,[286,3574,534],{"class":296},[286,3576,1785],{"class":315},[286,3578,3580],{"class":288,"line":3579},204,[286,3581,3582],{"class":479},"    # itch.io only starts a browser game if index.html is at the root of the zip (\"Failed to find index.html\")\n",[286,3584,3586,3588],{"class":288,"line":3585},205,[286,3587,534],{"class":296},[286,3589,3590],{"class":315}," unzip -l build\u002Fmygame-gx.zip | awk '{print $4}' | grep -qx index.html || { echo \"build\u002Fmygame-gx.zip has no index.html at its root\"; exit 1; }\n",[286,3592,3594,3596],{"class":288,"line":3593},206,[286,3595,534],{"class":296},[286,3597,1799],{"class":315},[286,3599,3601],{"class":288,"line":3600},207,[286,3602,2206],{"emptyLinePlaceholder":2205},[286,3604,3606],{"class":288,"line":3605},208,[286,3607,2308],{"class":479},[286,3609,3611],{"class":288,"line":3610},209,[286,3612,3613],{"class":479},"# DEPLOY: GX.games (gm-cli gxgames)\n",[286,3615,3617],{"class":288,"line":3616},210,[286,3618,3619],{"class":479},"# Reuses the login and tool install from build_linux.\n",[286,3621,3623],{"class":288,"line":3622},211,[286,3624,3625],{"class":479},"# Only uploads an internal version: `gxgames meta` and `gxgames publish` were done once by hand.\n",[286,3627,3629],{"class":288,"line":3628},212,[286,3630,2308],{"class":479},[286,3632,3634,3636],{"class":288,"line":3633},213,[286,3635,227],{"class":292},[286,3637,297],{"class":296},[286,3639,3641,3644,3646],{"class":288,"line":3640},214,[286,3642,3643],{"class":292},"  extends",[286,3645,309],{"class":296},[286,3647,3648],{"class":315}," build_linux\n",[286,3650,3652,3654,3656],{"class":288,"line":3651},215,[286,3653,419],{"class":292},[286,3655,309],{"class":296},[286,3657,1704],{"class":315},[286,3659,3661,3663,3665],{"class":288,"line":3660},216,[286,3662,1718],{"class":292},[286,3664,309],{"class":296},[286,3666,3667],{"class":296}," []\n",[286,3669,3671,3673],{"class":288,"line":3670},217,[286,3672,486],{"class":292},[286,3674,297],{"class":296},[286,3676,3678,3680,3682,3684,3687],{"class":288,"line":3677},218,[286,3679,494],{"class":292},[286,3681,309],{"class":296},[286,3683,454],{"class":296},[286,3685,3686],{"class":315},"gm-cache-v4-gxgames",[286,3688,460],{"class":296},[286,3690,3692,3694],{"class":288,"line":3691},219,[286,3693,509],{"class":292},[286,3695,297],{"class":296},[286,3697,3699,3701],{"class":288,"line":3698},220,[286,3700,517],{"class":296},[286,3702,520],{"class":315},[286,3704,3706,3708],{"class":288,"line":3705},221,[286,3707,562],{"class":292},[286,3709,297],{"class":296},[286,3711,3713,3715],{"class":288,"line":3712},222,[286,3714,534],{"class":296},[286,3716,3240],{"class":315},[286,3718,3720,3722],{"class":288,"line":3719},223,[286,3721,534],{"class":296},[286,3723,581],{"class":580},[286,3725,3727],{"class":288,"line":3726},224,[286,3728,587],{"class":315},[286,3730,3732],{"class":288,"line":3731},225,[286,3733,3734],{"class":315},"        --target=operagx \\\n",[286,3736,3738],{"class":288,"line":3737},226,[286,3739,599],{"class":315},[286,3741,3743],{"class":288,"line":3742},227,[286,3744,3745],{"class":315},"        --output=build\u002Fmygame-gx.zip \\\n",[286,3747,3749],{"class":288,"line":3748},228,[286,3750,617],{"class":315},[286,3752,3754],{"class":288,"line":3753},229,[286,3755,3756],{"class":479},"    # gxgames logs in with OAuth in a browser. In CI we inject the auth.json from a local login\n",[286,3758,3760],{"class":288,"line":3759},230,[286,3761,3762],{"class":479},"    # (with CI=true, gm-cli looks for it in .gmcache\u002Fgxgames-auth\u002F). When it expires, gm-cli\n",[286,3764,3766],{"class":288,"line":3765},231,[286,3767,3768],{"class":479},"    # renews it with its refreshToken. If the runner cache already has a renewed one, keep it.\n",[286,3770,3772],{"class":288,"line":3771},232,[286,3773,3774],{"class":479},"    # If the refreshToken dies, log in locally again and update the variable.\n",[286,3776,3778,3780],{"class":288,"line":3777},233,[286,3779,534],{"class":296},[286,3781,581],{"class":580},[286,3783,3785],{"class":288,"line":3784},234,[286,3786,3787],{"class":315},"      if [ ! -f .gmcache\u002Fgxgames-auth\u002Fauth.json ]; then\n",[286,3789,3791],{"class":288,"line":3790},235,[286,3792,3793],{"class":315},"        if [ -z \"$GX_AUTH_JSON\" ]; then echo \"Missing File variable GX_AUTH_JSON (gxgames auth.json).\"; exit 1; fi\n",[286,3795,3797],{"class":288,"line":3796},236,[286,3798,3799],{"class":315},"        mkdir -p .gmcache\u002Fgxgames-auth && cp \"$GX_AUTH_JSON\" .gmcache\u002Fgxgames-auth\u002Fauth.json\n",[286,3801,3803],{"class":288,"line":3802},237,[286,3804,3021],{"class":315},[286,3806,3808],{"class":288,"line":3807},238,[286,3809,3810],{"class":479},"    # Without either ID, link opens an interactive picker and the job dies (exit 13)\n",[286,3812,3814,3816],{"class":288,"line":3813},239,[286,3815,534],{"class":296},[286,3817,581],{"class":580},[286,3819,3821],{"class":288,"line":3820},240,[286,3822,3823],{"class":315},"      if [ -z \"$GX_STUDIO_ID\" ] || [ -z \"$GX_GAME_ID\" ]; then echo \"Missing GX_STUDIO_ID \u002F GX_GAME_ID in the CI variables.\"; exit 1; fi\n",[286,3825,3827,3829],{"class":288,"line":3826},241,[286,3828,534],{"class":296},[286,3830,3831],{"class":315}," npx --yes @gamemaker\u002Fgm-cli@latest gxgames link --studioid \"$GX_STUDIO_ID\" --gameid \"$GX_GAME_ID\"\n",[286,3833,3835],{"class":288,"line":3834},242,[286,3836,3837],{"class":479},"    # After uploading, gm-cli opens the publish page with xdg-open; without a browser it exits with 1.\n",[286,3839,3841],{"class":288,"line":3840},243,[286,3842,3843],{"class":479},"    # A fake xdg-open that only prints the URL.\n",[286,3845,3847,3849],{"class":288,"line":3846},244,[286,3848,534],{"class":296},[286,3850,3851],{"class":315}," printf '#!\u002Fbin\u002Fsh\\necho \"xdg-open $*\"\\n' > \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open && chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fxdg-open\n",[286,3853,3855],{"class":288,"line":3854},245,[286,3856,3857],{"class":479},"    # --version is required in CI (without it, gm-cli asks on the keyboard) and must be X.Y.Z.B\n",[286,3859,3861,3863],{"class":288,"line":3860},246,[286,3862,534],{"class":296},[286,3864,3865],{"class":315}," npx --yes @gamemaker\u002Fgm-cli@latest gxgames upload --file build\u002Fmygame-gx.zip --version \"0.1.0.$CI_PIPELINE_IID\"\n",[286,3867,3869,3871],{"class":288,"line":3868},247,[286,3870,623],{"class":292},[286,3872,297],{"class":296},[286,3874,3876,3878,3880,3882,3885],{"class":288,"line":3875},248,[286,3877,2812],{"class":292},[286,3879,309],{"class":296},[286,3881,454],{"class":296},[286,3883,3884],{"class":315},"$CI_PROJECT_NAME-gx-$CI_COMMIT_SHORT_SHA",[286,3886,460],{"class":296},[286,3888,3890,3892],{"class":288,"line":3889},249,[286,3891,509],{"class":292},[286,3893,297],{"class":296},[286,3895,3897,3899],{"class":288,"line":3896},250,[286,3898,517],{"class":296},[286,3900,3901],{"class":315}," build\u002Fmygame-gx.zip\n",[286,3903,3905,3907,3909],{"class":288,"line":3904},251,[286,3906,649],{"class":292},[286,3908,309],{"class":296},[286,3910,3911],{"class":315}," 7 days\n",[11,3913,3914,3915,355],{},"If you have questions about the pipeline or get stuck on any step, come and ask us on our ",[30,3916,3919],{"href":3917,"rel":3918},"https:\u002F\u002Fdiscord.gg\u002FNarezDjTKJ",[68],"Discord",[3921,3922,3923],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":267,"searchDepth":300,"depth":300,"links":3925},[3926,3927,3928,3929,3932,3936,3937,3941,3942,3943,3944,3945,3949,3950],{"id":25,"depth":300,"text":26},{"id":53,"depth":300,"text":54},{"id":73,"depth":300,"text":74},{"id":156,"depth":300,"text":157,"children":3930},[3931],{"id":272,"depth":427,"text":273},{"id":399,"depth":300,"text":400,"children":3933},[3934,3935],{"id":704,"depth":427,"text":705},{"id":861,"depth":427,"text":862},{"id":1040,"depth":300,"text":1041},{"id":1183,"depth":300,"text":1184,"children":3938},[3939,3940],{"id":1332,"depth":427,"text":1333},{"id":1501,"depth":427,"text":1502},{"id":1680,"depth":300,"text":1681},{"id":1845,"depth":300,"text":1846},{"id":2017,"depth":300,"text":2018},{"id":2059,"depth":300,"text":2060},{"id":2091,"depth":300,"text":2092,"children":3946},[3947,3948],{"id":2095,"depth":427,"text":2096},{"id":2102,"depth":427,"text":2103},{"id":2113,"depth":300,"text":2114},{"id":2129,"depth":300,"text":2130},null,"2026-11-16","How we built a GameMaker CI pipeline with gm-cli and GitLab CI: Windows, Linux and web builds shipped to itch.io and GX.games.",false,"md","mokgard",{},"\u002Fblog\u002Fgamemaker-ci-pipeline-gitlab",{"title":5,"description":3953},"blog\u002Fgamemaker-ci-pipeline-gitlab",[3962,3963,3964,82],"gamemaker","ci-cd","gitlab-ci","E8DHZhAW-tYeYEPtVnY6J0ZGN7oVWu1_L_cllcrCbG0",[3967,3971],{"title":3968,"path":3969,"stem":3970,"children":-1},"Game UI Redesign: From SaaS Dashboard to Title Screen","\u002Fblog\u002Fgame-ui-redesign-web-rpg","blog\u002Fgame-ui-redesign-web-rpg",{"title":3972,"path":3973,"stem":3974,"children":-1},"LLM Regression Testing: When Reasoning Ate Our Tokens","\u002Fblog\u002Fllm-regression-testing-game-ai","blog\u002Fllm-regression-testing-game-ai",1795346164972]