Random kernel format (#11) #2
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
name: Obfuscate JS Code | |
on: | |
push: | |
branches: ["master"] | |
paths: | |
- "js/src/*" | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
obfuscate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Obfuscate JS Code | |
run: | | |
cd $GITHUB_WORKSPACE/js/src | |
sudo npm install uglify-js -g | |
sudo npm install javascript-obfuscator -g | |
rm ../bundle.min.js | |
uglifyjs ./terminal.js ./boot.js ./crypto.js ./system.js ./filesystem.js ./commands.js -c -o ./output.js | |
javascript-obfuscator ./output.js -o ../bundle.min.js --options-preset high-obfuscation | |
rm ./output.js | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -a -m "Obfuscate js code" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |