Skip to content

Commit

Permalink
workflows:release - generate JSON files from YAML files on release
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Dec 19, 2023
1 parent a34eb3c commit 6b27afa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ jobs:
- name: Get Tag
id: tag
run: echo "tag=$(git tag -l --sort=-version:refname | head -1)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Dependencies
run: python -m pip install pyyaml
- name: Generate JSON Files
run: |
python3 -c 'import yaml,json,sys;json.dump(yaml.load(open(sys.argv[1]), yaml.Loader), open(sys.argv[2], "w"))' fileformats.yml fileformats.json
python3 -c 'import yaml,json,sys;json.dump(yaml.load(open(sys.argv[1]), yaml.Loader), open(sys.argv[2], "w"))' custom_signatures.yml custom_signatures.json
- name: Create Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -25,4 +34,5 @@ jobs:
files: |
fileformats.yml
custom_signatures.yml
fileformats.json
custom_signatures.json

0 comments on commit 6b27afa

Please sign in to comment.