Compare commits
33 Commits
849d2f96aa
...
ed5609cc05
| Author | SHA1 | Date | |
|---|---|---|---|
| ed5609cc05 | |||
| ef603893d4 | |||
| f437c74634 | |||
| a1439f7c3d | |||
| 7578ff60f0 | |||
| 02d87f88da | |||
| 0945bb417f | |||
| 44498fed29 | |||
| 8a4a11caf6 | |||
| afb015fed1 | |||
| 1ba617e863 | |||
| c06b06c748 | |||
| fad9d4279b | |||
| d11bca611e | |||
| d596c6caba | |||
| 2990d65a63 | |||
| 0110936f32 | |||
| 158d85d821 | |||
| c3710d152e | |||
| b6cbdce51f | |||
| 81baa4f3d4 | |||
| cff26ff339 | |||
| f37033a178 | |||
| da25dac794 | |||
| cbcdb66417 | |||
| bdd36603df | |||
| cc86f845a2 | |||
| 1ae8cbeef5 | |||
| 28e3afafae | |||
| 76f4106fd7 | |||
| 8b72c4d148 | |||
| 974597fd16 | |||
| c753270446 |
67
.github/workflows/Build.yml
vendored
Normal file
67
.github/workflows/Build.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Build and Save Artifact
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
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'
|
||||
|
||||
- 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=${{ 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
|
||||
git switch $BRANCH_NAME || git switch -c $BRANCH_NAME
|
||||
git merge ${SOURCE_BRANCH_NAME} -m "Update branch [skip ci]"
|
||||
rm -rf dist
|
||||
|
||||
# Install dependencies
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
# Build the project
|
||||
- name: Run npm build
|
||||
run: npm run build
|
||||
|
||||
# Commit build files
|
||||
- name: Commit build files to build branch
|
||||
run: |
|
||||
git add -f dist
|
||||
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
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-artifact
|
||||
path: |
|
||||
./dist
|
||||
./package.json
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -90,6 +90,7 @@ out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
|
||||
5
dist/index.d.mts
vendored
5
dist/index.d.mts
vendored
@ -1,5 +0,0 @@
|
||||
declare class NodeTest {
|
||||
static startTest(): void;
|
||||
}
|
||||
|
||||
export { NodeTest as default };
|
||||
5
dist/index.d.ts
vendored
5
dist/index.d.ts
vendored
@ -1,5 +0,0 @@
|
||||
declare class NodeTest {
|
||||
static startTest(): void;
|
||||
}
|
||||
|
||||
export { NodeTest as default };
|
||||
42
dist/index.js
vendored
42
dist/index.js
vendored
@ -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
|
||||
1
dist/index.js.map
vendored
1
dist/index.js.map
vendored
@ -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":[]}
|
||||
19
dist/index.mjs
vendored
19
dist/index.mjs
vendored
@ -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
|
||||
1
dist/index.mjs.map
vendored
1
dist/index.mjs.map
vendored
@ -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":[]}
|
||||
@ -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",
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import test from "./test";
|
||||
|
||||
export function startTest() {
|
||||
console.log("Hello, World!");
|
||||
let i: number = 0;
|
||||
setInterval(() => {
|
||||
i++;
|
||||
|
||||
Reference in New Issue
Block a user