Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/CI_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ jobs:
# since AC may have been added to JSON, need to revalidate JSON and re-generate md
python .validators\validator_json.py --output-md

- name: ⇅ Sort JSON
working-directory: .
if: ${{ contains('push workflow_dispatch', github.event_name) && github.ref == 'refs/heads/master' && github.repository == 'notepad-plus-plus/userDefinedLanguages' }}
run: |
# sort JSON back into string
$file = "udl-list.json"
$a = Get-Content $file | ConvertFrom-Json
$a.'UDLs' = $a.'UDLs' | sort -Property 'id-name'
$content = $a | ConvertTo-Json -Depth 5
#
# reformat JSON
$content = $content -replace ': ', ": "
$content = $content -replace ' ', " "
$content = $content -replace ' ', " "
$content = $content -replace ' ', " "
#
# save sorted JSON text
$content > $file

- name: 🎉 Update repo with automated changes for the UDL list and autoCompletions
uses: stefanzweifel/git-auto-commit-action@v7
if: contains('push workflow_dispatch', github.event_name)
Expand Down