Skip to content

Commit 174cb9c

Browse files
committed
[auto]
1 parent ea703c4 commit 174cb9c

File tree

10 files changed

+9634
-451
lines changed

10 files changed

+9634
-451
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
name: Release JavaScript GitHub Action
22
description: There is no need to commit node_modules.
3-
43
branding:
54
icon: git-branch
65
color: white
7-
86
inputs:
97
release-branch:
108
description: The name of branch to push compiled file.
119
required: true
1210
release-tags:
1311
description: The names of the tag to attach to the commit of the compiled file.
1412
required: false
15-
1613
runs:
1714
using: node12
18-
main: index.js
15+
main: dist/index.js

dist/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const { readFileSync, writeFileSync } = require('fs'), { Script } = require('vm'), { wrap } = require('module');
2+
const source = readFileSync(__dirname + '/index.js.cache.js', 'utf-8');
3+
const cachedData = !process.pkg && require('process').platform !== 'win32' && readFileSync(__dirname + '/index.js.cache');
4+
const script = new Script(wrap(source), cachedData ? { cachedData } : {});
5+
(script.runInThisContext())(exports, require, module, __filename, __dirname);
6+
if (cachedData) process.on('exit', () => { try { writeFileSync(__dirname + '/index.js.cache', script.createCachedData()); } catch(e) {} });

dist/index.js.cache

78.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)