Skip to content

Commit

Permalink
GH-21: Generate versions.json and do the proper replacements in rel…
Browse files Browse the repository at this point in the history
…ease notes
  • Loading branch information
negrutiu committed Jun 8, 2024
1 parent 8824628 commit 1ebf697
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 88 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,22 @@ jobs:
run_id: ${{github.run_id}}
skip_unpack: true

- name: Read `versions.json`
id: versions
shell: python
run: |
with open('artifacts/versions.json') as fin:
with open(os.getenv('GITHUB_OUTPUT'), "a") as fout:
fout.write(f"versions_json={fin.read()}")
- name: Prepare release notes
shell: python
run: |
lines = []
with open(".github/workflows/release-body.md") as fin:
line = fin.read()
line = line.replace('{version-engines}', '${{fromJson('artifacts/versions.json').curl_md}}')
line = line.replace('{version-gcc}', '${{fromJson('artifacts/versions.json').gcc}}')
line = line.replace('{version-engines}', '${{fromJson(steps.versions.outputs.versions_json).curl_md}}')
line = line.replace('{version-gcc}', '${{fromJson(steps.versions.outputs.versions_json).gcc}}')
line = line.replace('{url-workflow}', 'https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}')
lines.append(line)
with open(".github/workflows/release-body.md", "w") as fout:
Expand Down
86 changes: 0 additions & 86 deletions _build_package.bat

This file was deleted.

0 comments on commit 1ebf697

Please sign in to comment.