-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
irnsght
committed
May 20, 2023
1 parent
9f48788
commit ef43403
Showing
4 changed files
with
88 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js and NPM | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "latest" | ||
|
||
- name: "install dependencies" | ||
run: npm ci | ||
|
||
- name: full build and deploy | ||
run: npm run deploy | ||
|
||
- name: Get package version, write to .env file | ||
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> "$GITHUB_ENV" | ||
|
||
- name: Log version in js file | ||
run: echo "//script.name=Puddler v${{ env.VERSION }} by IR0NSIGHT" | cat - dist/Puddler.js > temp && mv temp dist/Puddler.js | ||
|
||
- name: Zip artifact | ||
run: cd dist && zip -r Puddler_v${{ env.VERSION }}.zip . && cd ../.. | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/Puddler_v${{ env.VERSION }}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
{ | ||
"name": "puddler", | ||
"version": "1.1.0", | ||
"description": "", | ||
"main": "Puddler.js", | ||
"name": "puddler", | ||
"version": "1.1.0", | ||
"description": "", | ||
"main": "Puddler.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"compile": "tsc -p ./tsconfig.json", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"compile": "tsc -p ./tsconfig.json", | ||
"insertHeader": "bash ./shellscripts/insertHeader.sh", | ||
"deploy": "npm run build && npm run insertHeader src/header.js dist/Puddler.js", | ||
"build": "npm run compile && webpack" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@babel/core": "^7.21.8", | ||
"@babel/polyfill": "^7.12.1", | ||
"@babel/preset-env": "^7.21.5", | ||
"babel-loader": "^9.1.2", | ||
"core-js": "^3.30.2", | ||
"ts-jest": "^29.1.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.0.4", | ||
"webpack": "^5.82.1", | ||
"webpack-cli": "^5.1.1", | ||
"webpack-dev-server": "^4.15.0" | ||
}, | ||
"@babel/core" : "^7.21.8", | ||
"@babel/polyfill" : "^7.12.1", | ||
"@babel/preset-env" : "^7.21.5", | ||
"babel-loader" : "^9.1.2" , | ||
"core-js" : "^3.30.2", | ||
"ts-jest" : "^29.1.0", | ||
"ts-node" : "^10.9.1", | ||
"typescript" : "^5.0.4" , | ||
"webpack" : "^5.82.1", | ||
"webpack-cli" : "^5.1.1" , | ||
"webpack-dev-server": "^4.15.0" | ||
}, | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Define the paths to the header and bundle files | ||
header=$1 | ||
bundle=$2 | ||
|
||
echo "insert header file: $header target: $bundle"; | ||
|
||
# Make the bundle file writable | ||
chmod +w "$bundle" | ||
|
||
# Create a temporary file for the updated bundle | ||
tmpfile=$(mktemp) | ||
|
||
# Prepend the header to the bundle | ||
cat "$header" "$bundle" > "$tmpfile" | ||
|
||
# Replace the original bundle with the updated version | ||
mv "$tmpfile" "$bundle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// script.description= create natural creeks and ponds | ||
// script.param.config.type=file | ||
// script.param.config.description=Path to config | ||
// script.param.config.optional=true | ||
// script.param.config.default=\AdvancedOperator\Operations\example.json |