From c7532704467517910eda340f3ecab59ca79fe9c6 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 15:07:13 +0200 Subject: [PATCH 01/31] Actions --- .github/workflows/Build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/Build.yml diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml new file mode 100644 index 0000000..3e8966a --- /dev/null +++ b/.github/workflows/Build.yml @@ -0,0 +1,40 @@ +name: Build and Save Artifact + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout repository + uses: actions/checkout@v3 + + # Set up Node.js environment + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' + + # Install dependencies + - name: Install dependencies + run: npm install + + # Build the project + - name: Run npm build + run: npm run build + + # Upload the build directory as an artifact + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: build-artifact + path: ./dist # Adjust this path to your actual build output directory (e.g., dist/ or similar) -- 2.49.0 From 974597fd1639bb09f556c41de011d3d3bd17ebbe Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 15:10:30 +0200 Subject: [PATCH 02/31] Update actions --- .github/workflows/Build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 3e8966a..2a96671 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -37,4 +37,6 @@ jobs: uses: actions/upload-artifact@v3 with: name: build-artifact - path: ./dist # Adjust this path to your actual build output directory (e.g., dist/ or similar) + path: | + ./dist + ./package.json -- 2.49.0 From 8b72c4d148a9229fa8f1ddfbca796622119dc844 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:06:59 +0200 Subject: [PATCH 03/31] Build with actions --- .github/workflows/Build.yml | 17 +++++++++++++++ .gitignore | 1 + dist/index.d.mts | 5 ----- dist/index.d.ts | 5 ----- dist/index.js | 42 ------------------------------------- dist/index.js.map | 1 - dist/index.mjs | 19 ----------------- dist/index.mjs.map | 1 - 8 files changed, 18 insertions(+), 73 deletions(-) delete mode 100644 dist/index.d.mts delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.js.map delete mode 100644 dist/index.mjs delete mode 100644 dist/index.mjs.map diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 2a96671..dbab316 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -24,6 +24,14 @@ jobs: with: node-version: '22' + # Delete existing build branch + - name: Delete existing build branch + run: git branch -d ${GITHUB_REF_NAME}-build || echo "Build branch not found" + + # Create and switch to build branch + - name: Create and switch to build branch + run: git branch ${GITHUB_REF_NAME}-build && git switch ${GITHUB_REF_NAME}-build + # Install dependencies - name: Install dependencies run: npm install @@ -32,6 +40,15 @@ jobs: - name: Run npm build run: npm run build + # Commit build files + - name: Commit build files to build branch + uses: actions/checkout@v3 + run: | + git config --global user.name 'Git Bot' + git config --global user.email 'noreply@kozelkaricsi.hu' + git add -f dist && git commit -am 'Build' + git push + # Upload the build directory as an artifact - name: Upload build artifact uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index a6e15b1..745264f 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,7 @@ out # Nuxt.js build / generate output .nuxt +dist # Gatsby files .cache/ diff --git a/dist/index.d.mts b/dist/index.d.mts deleted file mode 100644 index 7f3fba6..0000000 --- a/dist/index.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -declare class NodeTest { - static startTest(): void; -} - -export { NodeTest as default }; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 7f3fba6..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare class NodeTest { - static startTest(): void; -} - -export { NodeTest as default }; diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 57439c6..0000000 --- a/dist/index.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - default: () => NodeTest -}); -module.exports = __toCommonJS(src_exports); - -// src/test.ts -function test(i) { - console.log(`Hello, World! (#${i})`); -} - -// src/index.ts -var NodeTest = class { - static startTest() { - let i = 0; - setInterval(() => { - i++; - test(i); - }, 1e3); - } -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map deleted file mode 100644 index 640a3e9..0000000 --- a/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts","../src/test.ts"],"sourcesContent":["import test from \"./test\";\r\n\r\nexport default class NodeTest {\r\n static startTest() {\r\n let i: number = 0;\r\n setInterval(() => {\r\n i++;\r\n test(i);\r\n }, 1000);\r\n }\r\n}\r\n","export default function test(i: number) {\r\n console.log(`Hello, World! (#${i})`);\r\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAe,SAAR,KAAsB,GAAW;AACpC,UAAQ,IAAI,mBAAmB,CAAC,GAAG;AACvC;;;ADAA,IAAqB,WAArB,MAA8B;AAAA,EAC1B,OAAO,YAAY;AACf,QAAI,IAAY;AAChB,gBAAY,MAAM;AACd;AACA,WAAK,CAAC;AAAA,IACV,GAAG,GAAI;AAAA,EACX;AACJ;","names":[]} \ No newline at end of file diff --git a/dist/index.mjs b/dist/index.mjs deleted file mode 100644 index 54a4052..0000000 --- a/dist/index.mjs +++ /dev/null @@ -1,19 +0,0 @@ -// src/test.ts -function test(i) { - console.log(`Hello, World! (#${i})`); -} - -// src/index.ts -var NodeTest = class { - static startTest() { - let i = 0; - setInterval(() => { - i++; - test(i); - }, 1e3); - } -}; -export { - NodeTest as default -}; -//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/dist/index.mjs.map b/dist/index.mjs.map deleted file mode 100644 index 15addb3..0000000 --- a/dist/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/test.ts","../src/index.ts"],"sourcesContent":["export default function test(i: number) {\r\n console.log(`Hello, World! (#${i})`);\r\n}","import test from \"./test\";\r\n\r\nexport default class NodeTest {\r\n static startTest() {\r\n let i: number = 0;\r\n setInterval(() => {\r\n i++;\r\n test(i);\r\n }, 1000);\r\n }\r\n}\r\n"],"mappings":";AAAe,SAAR,KAAsB,GAAW;AACpC,UAAQ,IAAI,mBAAmB,CAAC,GAAG;AACvC;;;ACAA,IAAqB,WAArB,MAA8B;AAAA,EAC1B,OAAO,YAAY;AACf,QAAI,IAAY;AAChB,gBAAY,MAAM;AACd;AACA,WAAK,CAAC;AAAA,IACV,GAAG,GAAI;AAAA,EACX;AACJ;","names":[]} \ No newline at end of file -- 2.49.0 From 76f4106fd70db7a8c1f7fea84f3bc111c7281913 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:09:39 +0200 Subject: [PATCH 04/31] Update Actions --- .github/workflows/Build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index dbab316..38a943d 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -42,11 +42,10 @@ jobs: # Commit build files - name: Commit build files to build branch - uses: actions/checkout@v3 run: | git config --global user.name 'Git Bot' git config --global user.email 'noreply@kozelkaricsi.hu' - git add -f dist && git commit -am 'Build' + git add -f dist && git commit -am "Build" git push # Upload the build directory as an artifact -- 2.49.0 From 28e3afafae2d69a813f4a6cdde6dfdb775c67e05 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:10:46 +0200 Subject: [PATCH 05/31] Update Actions - Fix upstream error --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 38a943d..2d30a3b 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -46,7 +46,7 @@ jobs: git config --global user.name 'Git Bot' git config --global user.email 'noreply@kozelkaricsi.hu' git add -f dist && git commit -am "Build" - git push + git push --set-upstream origin ${GITHUB_REF_NAME}-build # Upload the build directory as an artifact - name: Upload build artifact -- 2.49.0 From 1ae8cbeef553825512c7fca720f4632c38f6ddb3 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:12:38 +0200 Subject: [PATCH 06/31] Update Actions --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 2d30a3b..be1e042 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -46,7 +46,7 @@ jobs: git config --global user.name 'Git Bot' git config --global user.email 'noreply@kozelkaricsi.hu' git add -f dist && git commit -am "Build" - git push --set-upstream origin ${GITHUB_REF_NAME}-build + git push --set-upstream origin ${GITHUB_REF_NAME}-build --force # Upload the build directory as an artifact - name: Upload build artifact -- 2.49.0 From cc86f845a29dade892cc27dbd6428715064cf241 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:16:10 +0200 Subject: [PATCH 07/31] Hello, World! --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index b20b0e3..c17cb19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import test from "./test"; export function startTest() { + console.log("Hello, World!"); let i: number = 0; setInterval(() => { i++; -- 2.49.0 From bdd36603df903dc3932d12ceb3d326eb6060e9b8 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:17:33 +0200 Subject: [PATCH 08/31] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec370bd..6e4b96d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-module-test", - "version": "1.0.0", + "version": "1.0.1", "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", -- 2.49.0 From cbcdb6641747d321af03ae982a16cacaa21c88f1 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:25:33 +0200 Subject: [PATCH 09/31] Actions: Merge if branch exists --- .github/workflows/Build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index be1e042..2393036 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -24,13 +24,13 @@ jobs: with: node-version: '22' - # Delete existing build branch - - name: Delete existing build branch - run: git branch -d ${GITHUB_REF_NAME}-build || echo "Build branch not found" - - # Create and switch to build branch - - name: Create and switch to build branch - run: git branch ${GITHUB_REF_NAME}-build && git switch ${GITHUB_REF_NAME}-build + # Initialize build branch + - name: Initialize build branch + run: | + git branch ${GITHUB_REF_NAME}-build || echo "Build branch already exists" + git switch ${GITHUB_REF_NAME}-build + git merge ${GITHUB_REF_NAME} + rm -rf dist # Install dependencies - name: Install dependencies -- 2.49.0 From da25dac7944af40524cba2d7c81beb889318685e Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:27:23 +0200 Subject: [PATCH 10/31] Actions: Switch branch first --- .github/workflows/Build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 2393036..b91ddb2 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -27,8 +27,7 @@ jobs: # Initialize build branch - name: Initialize build branch run: | - git branch ${GITHUB_REF_NAME}-build || echo "Build branch already exists" - git switch ${GITHUB_REF_NAME}-build + git switch ${GITHUB_REF_NAME}-build || git branch ${GITHUB_REF_NAME}-build && git switch ${GITHUB_REF_NAME}-build git merge ${GITHUB_REF_NAME} rm -rf dist -- 2.49.0 From f37033a17813b9181e45083c6426974a54d031c5 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:30:38 +0200 Subject: [PATCH 11/31] Update Actions as ChatGPT recommended --- .github/workflows/Build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index b91ddb2..f2aae82 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -27,8 +27,10 @@ jobs: # Initialize build branch - name: Initialize build branch run: | - git switch ${GITHUB_REF_NAME}-build || git branch ${GITHUB_REF_NAME}-build && git switch ${GITHUB_REF_NAME}-build - git merge ${GITHUB_REF_NAME} + BRANCH_NAME="${GITHUB_REF_NAME}-build" + git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist + git switch $BRANCH_NAME || git switch -c $BRANCH_NAME + git merge --no-ff ${GITHUB_REF_NAME} rm -rf dist # Install dependencies @@ -44,8 +46,9 @@ jobs: run: | git config --global user.name 'Git Bot' git config --global user.email 'noreply@kozelkaricsi.hu' - git add -f dist && git commit -am "Build" - git push --set-upstream origin ${GITHUB_REF_NAME}-build --force + git add -f dist + git commit -am "Build" + git push origin HEAD --force # Push to the current branch # Upload the build directory as an artifact - name: Upload build artifact -- 2.49.0 From cff26ff339d191b449f7372bc9f1cd9d0acfa89c Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:33:40 +0200 Subject: [PATCH 12/31] Actions: Add "Nothing to commit" to prevent fail --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index f2aae82..8646d83 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -47,7 +47,7 @@ jobs: git config --global user.name 'Git Bot' git config --global user.email 'noreply@kozelkaricsi.hu' git add -f dist - git commit -am "Build" + git commit -am "Build" || echo "Nothing to commit" git push origin HEAD --force # Push to the current branch # Upload the build directory as an artifact -- 2.49.0 From 81baa4f3d414cff28023caa8de9f647617ce544d Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:36:21 +0200 Subject: [PATCH 13/31] Actions: --allow-unrelated-histories --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 8646d83..be25dad 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -30,7 +30,7 @@ jobs: BRANCH_NAME="${GITHUB_REF_NAME}-build" git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME - git merge --no-ff ${GITHUB_REF_NAME} + git merge --allow-unrelated-histories ${GITHUB_REF_NAME} rm -rf dist # Install dependencies -- 2.49.0 From b6cbdce51f7b49b7b51a667638ea4ee6831b145a Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:37:20 +0200 Subject: [PATCH 14/31] Move git config --- .github/workflows/Build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index be25dad..5d0e3ea 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -27,6 +27,8 @@ jobs: # Initialize build branch - name: Initialize build branch run: | + git config --global user.name 'Git Bot' + git config --global user.email 'noreply@kozelkaricsi.hu' BRANCH_NAME="${GITHUB_REF_NAME}-build" git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME @@ -44,8 +46,6 @@ jobs: # Commit build files - name: Commit build files to build branch run: | - git config --global user.name 'Git Bot' - git config --global user.email 'noreply@kozelkaricsi.hu' git add -f dist git commit -am "Build" || echo "Nothing to commit" git push origin HEAD --force # Push to the current branch -- 2.49.0 From c3710d152ef0c07b44c46e99b6165dcd7ee2725a Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:39:29 +0200 Subject: [PATCH 15/31] Actions: Remove -a from commit --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 5d0e3ea..ecd30dd 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -47,7 +47,7 @@ jobs: - name: Commit build files to build branch run: | git add -f dist - git commit -am "Build" || echo "Nothing to commit" + git commit -m "Build" || echo "Nothing to commit" git push origin HEAD --force # Push to the current branch # Upload the build directory as an artifact -- 2.49.0 From 158d85d821538a7ff6fc08aa21419df46808621c Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:40:41 +0200 Subject: [PATCH 16/31] Actions: Redo merge command --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index ecd30dd..7442593 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -32,7 +32,7 @@ jobs: BRANCH_NAME="${GITHUB_REF_NAME}-build" git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME - git merge --allow-unrelated-histories ${GITHUB_REF_NAME} + git merge --no-ff ${GITHUB_REF_NAME} rm -rf dist # Install dependencies -- 2.49.0 From 0110936f3241febfb3ba6cbf79de138c7b31b248 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:41:35 +0200 Subject: [PATCH 17/31] Test --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index c17cb19..9e09de4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import test from "./test"; export function startTest() { - console.log("Hello, World!"); + console.log("Hello, World?"); let i: number = 0; setInterval(() => { i++; -- 2.49.0 From 2990d65a6342e02c9f9c5ca636ec09c5dae0896d Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:42:17 +0200 Subject: [PATCH 18/31] Actions: Revert revert git merge command --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 7442593..ecd30dd 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -32,7 +32,7 @@ jobs: BRANCH_NAME="${GITHUB_REF_NAME}-build" git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME - git merge --no-ff ${GITHUB_REF_NAME} + git merge --allow-unrelated-histories ${GITHUB_REF_NAME} rm -rf dist # Install dependencies -- 2.49.0 From d596c6cabaf56b31277da819fc18dce663cf5622 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:45:57 +0200 Subject: [PATCH 19/31] Update Actions --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index ecd30dd..6576f08 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -32,7 +32,7 @@ jobs: BRANCH_NAME="${GITHUB_REF_NAME}-build" git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME - git merge --allow-unrelated-histories ${GITHUB_REF_NAME} + git merge ${GITHUB_REF_NAME} rm -rf dist # Install dependencies -- 2.49.0 From d11bca611e84adf8f8bb5bd30462f99dca2750e7 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:51:42 +0200 Subject: [PATCH 20/31] Actions: Add unshallow to fetch --- .github/workflows/Build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 6576f08..38e49f1 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -29,8 +29,9 @@ jobs: run: | git config --global user.name 'Git Bot' git config --global user.email 'noreply@kozelkaricsi.hu' + git fetch --all --unshallow BRANCH_NAME="${GITHUB_REF_NAME}-build" - git fetch origin $BRANCH_NAME || true # Allow failure if branch doesn't exist + git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME git merge ${GITHUB_REF_NAME} rm -rf dist -- 2.49.0 From fad9d4279bbe39583ca3544c1cbe6dcf9c64ad50 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:52:37 +0200 Subject: [PATCH 21/31] Test commit --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 9e09de4..c17cb19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import test from "./test"; export function startTest() { - console.log("Hello, World?"); + console.log("Hello, World!"); let i: number = 0; setInterval(() => { i++; -- 2.49.0 From c06b06c7485ec59730456d4edb9be23bcd8ce91a Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:54:54 +0200 Subject: [PATCH 22/31] Actions: New username --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 38e49f1..06040f2 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -27,7 +27,7 @@ jobs: # Initialize build branch - name: Initialize build branch run: | - git config --global user.name 'Git Bot' + git config --global user.name 'Git Workflow Bot' git config --global user.email 'noreply@kozelkaricsi.hu' git fetch --all --unshallow BRANCH_NAME="${GITHUB_REF_NAME}-build" -- 2.49.0 From 1ba617e863cf0672cf520967d4a59110ae118056 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:02:26 +0200 Subject: [PATCH 23/31] Update Actions --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 06040f2..b6531a1 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -33,7 +33,7 @@ jobs: BRANCH_NAME="${GITHUB_REF_NAME}-build" git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME - git merge ${GITHUB_REF_NAME} + git merge ${GITHUB_REF_NAME} -m "Update branch [skip ci]" rm -rf dist # Install dependencies -- 2.49.0 From afb015fed15a539736b5d3656855db3c390eae03 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:02:55 +0200 Subject: [PATCH 24/31] Actions: Remove dev branch --- .github/workflows/Build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index b6531a1..0d32ff3 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - dev pull_request: branches: - main -- 2.49.0 From 8a4a11caf677883a2f005fc3c77390e387f99d9e Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:06:27 +0200 Subject: [PATCH 25/31] Actions: Other method for branch name --- .github/workflows/Build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 0d32ff3..ee0257e 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -26,13 +26,14 @@ jobs: # Initialize build branch - name: Initialize build branch run: | + SOURCE_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/}) git config --global user.name 'Git Workflow Bot' git config --global user.email 'noreply@kozelkaricsi.hu' git fetch --all --unshallow - BRANCH_NAME="${GITHUB_REF_NAME}-build" + BRANCH_NAME="${SOURCE_BRANCH_NAME}-build" git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME - git merge ${GITHUB_REF_NAME} -m "Update branch [skip ci]" + git merge ${SOURCE_BRANCH_NAME} -m "Update branch [skip ci]" rm -rf dist # Install dependencies -- 2.49.0 From 44498fed295c7d01abe7cbb1b61936b4ff1dfce3 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:09:36 +0200 Subject: [PATCH 26/31] Update Actions: Source branch name --- .github/workflows/Build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index ee0257e..2c68235 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -23,10 +23,15 @@ jobs: with: node-version: '22' + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + # Initialize build branch - name: Initialize build branch run: | - SOURCE_BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/}) + SOURCE_BRANCH_NAME=${{ steps.extract_branch.outputs.branch }} git config --global user.name 'Git Workflow Bot' git config --global user.email 'noreply@kozelkaricsi.hu' git fetch --all --unshallow -- 2.49.0 From 0945bb417f699e46ffee84da3e3b0d70b33e5b93 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:12:04 +0200 Subject: [PATCH 27/31] Update Actions --- .github/workflows/Build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 2c68235..a99e094 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -34,7 +34,6 @@ jobs: SOURCE_BRANCH_NAME=${{ steps.extract_branch.outputs.branch }} git config --global user.name 'Git Workflow Bot' git config --global user.email 'noreply@kozelkaricsi.hu' - git fetch --all --unshallow BRANCH_NAME="${SOURCE_BRANCH_NAME}-build" git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME -- 2.49.0 From 02d87f88da13d451215e4d0feee5bdc7f8ae9519 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:15:34 +0200 Subject: [PATCH 28/31] Update Actions --- .github/workflows/Build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index a99e094..3ea4bf6 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -34,6 +34,7 @@ jobs: SOURCE_BRANCH_NAME=${{ steps.extract_branch.outputs.branch }} git config --global user.name 'Git Workflow Bot' git config --global user.email 'noreply@kozelkaricsi.hu' + git checkout ${SOURCE_BRANCH_NAME} BRANCH_NAME="${SOURCE_BRANCH_NAME}-build" git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist git switch $BRANCH_NAME || git switch -c $BRANCH_NAME -- 2.49.0 From 7578ff60f00f7558abe015875f1ed8c61bfdaf2e Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:16:34 +0200 Subject: [PATCH 29/31] Update Actions --- .github/workflows/Build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 3ea4bf6..de5fcf4 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -34,6 +34,7 @@ jobs: SOURCE_BRANCH_NAME=${{ steps.extract_branch.outputs.branch }} git config --global user.name 'Git Workflow Bot' git config --global user.email 'noreply@kozelkaricsi.hu' + git fetch origin git checkout ${SOURCE_BRANCH_NAME} BRANCH_NAME="${SOURCE_BRANCH_NAME}-build" git fetch origin $BRANCH_NAME --unshallow || true # Allow failure if branch doesn't exist -- 2.49.0 From a1439f7c3d1bf038d737e4d308cb56fbcf4642a6 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:18:10 +0200 Subject: [PATCH 30/31] Test commit --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index c17cb19..743631e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import test from "./test"; export function startTest() { - console.log("Hello, World!"); + console.log("Hello, World! 3"); let i: number = 0; setInterval(() => { i++; -- 2.49.0 From f437c74634f26c7c3144958b08d46232375f261e Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 17:19:02 +0200 Subject: [PATCH 31/31] Test commit --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 743631e..c17cb19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import test from "./test"; export function startTest() { - console.log("Hello, World! 3"); + console.log("Hello, World!"); let i: number = 0; setInterval(() => { i++; -- 2.49.0