Skip to content

Commit 3ecec78

Browse files
committed
Initial
0 parents  commit 3ecec78

File tree

1,651 files changed

+468789
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,651 files changed

+468789
-0
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: d10sfan

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "npm"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build Action
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Setup Node
12+
uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
- name: NPM Install
16+
run: npm ci
17+
- name: Commit data
18+
run: |
19+
git config --local user.email "[email protected]"
20+
git config --local user.name "GitHub Action"
21+
git add -A node_modules
22+
git commit -m "Update release"
23+
- name: Push Changes
24+
uses: ad-m/github-push-action@master
25+
with:
26+
github_token: ${{ secrets.GITHUB_TOKEN }}
27+
branch: main

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Test Action
2+
on:
3+
pull_request:
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
- name: Setup Node
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: 20
14+
- name: NPM Install
15+
run: npm ci

.gitignore

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional stylelint cache
57+
.stylelintcache
58+
59+
# Microbundle cache
60+
.rpt2_cache/
61+
.rts2_cache_cjs/
62+
.rts2_cache_es/
63+
.rts2_cache_umd/
64+
65+
# Optional REPL history
66+
.node_repl_history
67+
68+
# Output of 'npm pack'
69+
*.tgz
70+
71+
# Yarn Integrity file
72+
.yarn-integrity
73+
74+
# dotenv environment variable files
75+
.env
76+
.env.development.local
77+
.env.test.local
78+
.env.production.local
79+
.env.local
80+
81+
# parcel-bundler cache (https://parceljs.org/)
82+
.cache
83+
.parcel-cache
84+
85+
# Next.js build output
86+
.next
87+
out
88+
89+
# Nuxt.js build / generate output
90+
.nuxt
91+
92+
# Gatsby files
93+
.cache/
94+
# Comment in the public line in if your project uses Gatsby and not Next.js
95+
# https://nextjs.org/blog/next-9-1#public-directory-support
96+
# public
97+
98+
# vuepress build output
99+
.vuepress/dist
100+
101+
# vuepress v2.x temp and cache directory
102+
.temp
103+
.cache
104+
105+
# Docusaurus cache and generated files
106+
.docusaurus
107+
108+
# Serverless directories
109+
.serverless/
110+
111+
# FuseBox cache
112+
.fusebox/
113+
114+
# DynamoDB Local files
115+
.dynamodb/
116+
117+
# TernJS port file
118+
.tern-port
119+
120+
# Stores VSCode versions used for testing VSCode extensions
121+
.vscode-test
122+
123+
# yarn v2
124+
.yarn/cache
125+
.yarn/unplugged
126+
.yarn/build-state.yml
127+
.yarn/install-state.gz
128+
.pnp.*

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 luxtorpeda-dev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# action-update-engine-version
2+
3+
## Building
4+
5+
* Make any changes to the index.js
6+
* Commit everything including node_modules

action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Update Engine With New Release'
2+
description: 'Update engine based on inputs'
3+
author: 'd10sfan'
4+
runs:
5+
using: 'node20'
6+
main: 'index.js'
7+
inputs:
8+
engineName:
9+
description: Name of engine
10+
required: true
11+
newTag:
12+
description: New tag string
13+
required: true
14+
oldTag:
15+
description: Old tag string
16+
required: true
17+
outputs:
18+
matrix:
19+
description: Matrix

index.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
const core = require('@actions/core');
2+
const { context, GitHub } = require('@actions/github');
3+
const fs = require('fs').promises;
4+
const path = require('path');
5+
const axios = require('axios');
6+
const { Octokit, App } = require("octokit");
7+
8+
const packagesEnginesPath = 'engines';
9+
10+
console.log('Starting.');
11+
12+
async function run() {
13+
try {
14+
const engineName = core.getInput('engineName');
15+
const newTag = core.getInput('newTag');
16+
const envJsonPath = path.join(packagesEnginesPath, engineName, 'env.json');
17+
18+
const envJsonStr = await fs.readFile(envJsonPath, 'utf-8');
19+
const envData = JSON.parse(envJsonStr);
20+
envData.COMMIT_TAG = newTag;
21+
await fs.writeFile(envJsonPath, JSON.stringify(envData, null, 4));
22+
23+
const packagesJsonPath = path.join('metadata', 'packagessniper_v2.json');
24+
const packagesJsonStr = await fs.readFile(packagesJsonPath, 'utf-8');
25+
const packagesJson = JSON.parse(packagesJsonStr);
26+
27+
for(let engineData of packagesJson.engines) {
28+
if(engineData.internal_engine_name === engineName) {
29+
engineData.version = newTag;
30+
}
31+
}
32+
33+
await fs.writeFile(packagesJsonPath, JSON.stringify(packagesJson, null, 4));
34+
}
35+
catch (error) {
36+
core.setFailed(error.message);
37+
}
38+
}
39+
40+
run();

node_modules/.bin/ncc

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)