Skip to content

Commit 2c1d453

Browse files
committed
Add list of included packages in release notes
1 parent 13433c9 commit 2c1d453

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ jobs:
2222
fetch-depth: 0
2323
- uses: conda-incubator/setup-miniconda@v3
2424
with:
25-
miniforge-version: latest
2625
environment-file: conda_environment.yml
2726
activate-environment: hyperspy-bundle
28-
conda-remove-defaults: "true"
2927

3028
- name: Conda info
3129
shell: bash -l {0}

.github/workflows/release.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ jobs:
5151
run: |
5252
echo ${{ env.VERSION }}
5353
54+
- uses: conda-incubator/setup-miniconda@v3
55+
56+
- name: Install constructor
57+
run: |
58+
# Constructor is needed to parse the list of included packages
59+
conda install constructor==${{ env.CONSTRUCTOR_VERSION }}
60+
61+
- name: Conda info
62+
run: |
63+
conda info
64+
conda list
65+
5466
- name: Find and Replace Version in Release Notes
5567
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
5668
if: startsWith(github.ref, 'refs/tags/')
@@ -67,6 +79,27 @@ jobs:
6779
replace: ${{ env.CONSTRUCTOR_VERSION }}
6880
include: "RELEASE_TEXT.md" # Will match all RELEASE_TEXT.md files in any nested directory
6981

82+
- name: Update packages list
83+
run: |
84+
python parse_list_libraries.py
85+
echo "List of libraries and software"
86+
echo "=============================="
87+
cat ./docs/specs.rst
88+
89+
- name: Save `docs/specs.rst` content as environment variable
90+
run: |
91+
echo "INCLUDED_PACKAGES<<EOF" >> $GITHUB_ENV
92+
cat ./docs/specs.rst >> $GITHUB_ENV
93+
echo "EOF" >> $GITHUB_ENV
94+
95+
- name: Find and Replace included packages in Release Notes
96+
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
97+
if: startsWith(github.ref, 'refs/tags/')
98+
with:
99+
find: "__INCLUDED_PACKAGES__"
100+
replace: ${{ env.INCLUDED_PACKAGES }}
101+
include: "RELEASE_TEXT.md" # Will match all RELEASE_TEXT.md files in any nested directory
102+
70103
- name: Create Release
71104
if: startsWith(github.ref, 'refs/tags/')
72105
id: create_release
@@ -132,10 +165,6 @@ jobs:
132165
steps:
133166
- uses: actions/checkout@v6
134167
- uses: conda-incubator/setup-miniconda@v3
135-
with:
136-
miniforge-version: latest
137-
channels: conda-forge
138-
channel-priority: strict
139168

140169
- name: Install constructor
141170
run: |

RELEASE_TEXT.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ For Mac, there are also two variants available:
1616
- `Intel` for Mac computers with Intel CPU, with the MKL library
1717
- `Silicon` for Mac computers with Apple Silicon (M1, M2, etc.) CPU, with the Accelerate library
1818

19-
For included packages, [see documentation](https://hyperspy.org/hyperspy-bundle/index.html#included-software-and-libraries).
19+
<details>
20+
21+
<summary>Included packages</summary>
22+
23+
__INCLUDED_PACKAGES__
24+
25+
</details>
2026

2127
This distribution is built using [constructor __CONSTRUCTOR_VERSION__](https://conda.github.io/constructor).
2228

0 commit comments

Comments
 (0)