Skip to content

more unit tests and improved error handling #54

more unit tests and improved error handling

more unit tests and improved error handling #54

Workflow file for this run

name: Compile structures
on:
push:
branches:
- main
jobs:
compile-structures:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install JSDoc
run: npm install -g jsdoc
- name: Compile structures
run: |
for file in $(find ./src/structures -name '*.js');
do
echo "Compiling $file"
jsdoc -X $file > src/structures/compiled/$(basename "$file").json
done
output="module.exports = {"
for file in $(find ./src/structures/compiled -name '*.json');
do
echo "Adding file to export $file"
output="$output $(basename $file .js.json): require('./structures/compiled/$(basename $file)'),"
done
output="$output };"
echo $output > ./src/compiledStructures.js
- name: Import bot's GPG key for signing commits
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
add: 'src'
committer_email: [email protected]
committer_name: Starman