Skip to content

Commit 24158d0

Browse files
committed
Write constructor version automatically in release notes
1 parent 09c494d commit 24158d0

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
PYTEST_QT_API: pyqt5
2525
# workaround for https://github.com/pyxem/pyxem/pull/1175
2626
TEST_DEPS: '"pytest<9" pytest-qt pytest-xdist pytest-rerunfailures pytest-mpl filelock'
27+
CONSTRUCTOR_VERSION: '3.14.0'
2728

2829
jobs:
2930
create_release_job:
@@ -50,14 +51,22 @@ jobs:
5051
run: |
5152
echo ${{ env.VERSION }}
5253
53-
- name: Find and Replace
54+
- name: Find and Replace Version in Release Notes
5455
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
5556
if: startsWith(github.ref, 'refs/tags/')
5657
with:
5758
find: "__TAG__"
5859
replace: ${{ env.VERSION }}
5960
include: "RELEASE_TEXT.md" # Will match all RELEASE_TEXT.md files in any nested directory
6061

62+
- name: Find and Replace constructor version in Release Notes
63+
uses: jacobtomlinson/gha-find-replace@f1069b438f125e5395d84d1c6fd3b559a7880cb5
64+
if: startsWith(github.ref, 'refs/tags/')
65+
with:
66+
find: "__CONSTRUCTOR_VERSION__"
67+
replace: ${{ env.CONSTRUCTOR_VERSION }}
68+
include: "RELEASE_TEXT.md" # Will match all RELEASE_TEXT.md files in any nested directory
69+
6170
- name: Create Release
6271
if: startsWith(github.ref, 'refs/tags/')
6372
id: create_release
@@ -130,7 +139,7 @@ jobs:
130139

131140
- name: Install constructor
132141
run: |
133-
conda install constructor>=3.12.2
142+
conda install constructor==${{ env.CONSTRUCTOR_VERSION }}
134143
135144
- name: Conda info
136145
run: |

RELEASE_TEXT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For Mac, there are also two variants available:
1818

1919
For included packages, [see documentation](https://hyperspy.org/hyperspy-bundle/index.html#included-software-and-libraries).
2020

21-
This distribution is built using [constructor 3.6.0](https://conda.github.io/constructor).
21+
This distribution is built using [constructor __CONSTRUCTOR_VERSION__](https://conda.github.io/constructor).
2222

2323
## Portable (Windows only)
2424
The portable distribution is based on the [WinPython](https://winpython.github.io) distribution and is a self-extracting archive. Running the installer will install the distribution in the current directory. Since the distribution is portable, it can be moved to any directory or run from an external drive.

0 commit comments

Comments
 (0)