From 8b72c4d148a9229fa8f1ddfbca796622119dc844 Mon Sep 17 00:00:00 2001 From: Cyanoure Date: Sun, 15 Sep 2024 16:06:59 +0200 Subject: [PATCH] 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