Skip to content

Commit bddb037

Browse files
committed
Add list of included packages in release notes
1 parent 24158d0 commit bddb037

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ 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
2827
conda-remove-defaults: "true"

.github/workflows/release.yml

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

84+
- name: Update packages list
85+
run: |
86+
python parse_list_libraries.py
87+
echo "List of libraries and software"
88+
echo "=============================="
89+
cat ./docs/specs.rst
90+
91+
- name: Save `docs/specs.rst` content as environment variable
92+
run: |
93+
echo "INCLUDED_PACKAGES<<EOF" >> $GITHUB_ENV
94+
cat ./docs/specs.rst >> $GITHUB_ENV
95+
echo "EOF" >> $GITHUB_ENV
96+
97+
- name: Find and Replace included packages in Release Notes
98+
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
99+
if: startsWith(github.ref, 'refs/tags/')
100+
with:
101+
find: "__INCLUDED_PACKAGES__"
102+
replace: ${{ env.INCLUDED_PACKAGES }}
103+
include: "RELEASE_TEXT.md" # Will match all RELEASE_TEXT.md files in any nested directory
104+
70105
- name: Create Release
71106
if: startsWith(github.ref, 'refs/tags/')
72107
id: create_release
@@ -133,9 +168,7 @@ jobs:
133168
- uses: actions/checkout@v6
134169
- uses: conda-incubator/setup-miniconda@v3
135170
with:
136-
miniforge-version: latest
137-
channels: conda-forge
138-
channel-priority: strict
171+
conda-remove-defaults: "true"
139172

140173
- name: Install constructor
141174
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)