Update dropdownOption.js #35
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: 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/structures.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 |