Skip to content

Commit 20b8043

Browse files
authored
Merge pull request #20315 from mrclary/release-candidate-workflow
PR: Update installer workflows to run as release on push of `pre` tag
2 parents 1ff41d5 + 65a887c commit 20b8043

File tree

4 files changed

+43
-11
lines changed

4 files changed

+43
-11
lines changed

.github/workflows/installer-macos.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,19 @@ on:
1818
types:
1919
- created
2020

21+
push:
22+
tags:
23+
- v*pre*
24+
2125
concurrency:
2226
group: installer-macos-${{ github.ref }}
2327
cancel-in-progress: true
2428

2529
name: Create macOS App Bundle and DMG
2630

31+
env:
32+
IS_PRE: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
33+
2734
jobs:
2835
matrix_prep:
2936
name: Determine Build Matrix
@@ -33,7 +40,7 @@ jobs:
3340
steps:
3441
- id: set-matrix
3542
run: |
36-
if [[ ${GITHUB_EVENT_NAME} == 'release' ]]; then
43+
if [[ ${GITHUB_EVENT_NAME} == 'release' || ${IS_PRE} == 'true' ]]; then
3744
build_type=$(echo "['Full', 'Lite']")
3845
else
3946
build_type=$(echo "['Full']")
@@ -96,10 +103,10 @@ jobs:
96103
- name: Build Application Bundle
97104
run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR}
98105
- name: Create Keychain
99-
if: ${{github.event_name == 'release'}}
106+
if: ${{github.event_name == 'release' || env.IS_PRE == 'true'}}
100107
run: ./certkeychain.sh "${MACOS_CERTIFICATE}" "${MACOS_CERTIFICATE_PWD}"
101108
- name: Code Sign Application
102-
if: ${{github.event_name == 'release'}}
109+
if: ${{github.event_name == 'release' || env.IS_PRE == 'true'}}
103110
run: |
104111
pil=$(${pythonLocation}/bin/python -c "import PIL, os; print(os.path.dirname(PIL.__file__))")
105112
rm -v ${DISTDIR}/Spyder.app/Contents/Frameworks/liblzma.5.dylib
@@ -110,10 +117,10 @@ jobs:
110117
- name: Build Disk Image
111118
run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR} --dmg --no-app
112119
- name: Sign Disk Image
113-
if: ${{github.event_name == 'release'}}
120+
if: ${{github.event_name == 'release' || env.IS_PRE == 'true'}}
114121
run: ./codesign.sh "${DISTDIR}/${DMGNAME}"
115122
- name: Notarize Disk Image
116-
if: ${{github.event_name == 'release'}}
123+
if: ${{github.event_name == 'release' || env.IS_PRE == 'true'}}
117124
run: ./notarize.sh -i 30 -p "${APPLICATION_PWD}" "${DISTDIR}/${DMGNAME}"
118125
- name: Upload Artifact
119126
uses: actions/upload-artifact@v2

.github/workflows/installer-win.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@ on:
1919
types:
2020
- created
2121

22+
push:
23+
tags:
24+
- v*pre*
25+
2226
concurrency:
2327
group: installer-win-${{ github.ref }}
2428
cancel-in-progress: true
2529

2630
name: Create Windows Installer
2731

32+
env:
33+
IS_PRE: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
34+
2835
jobs:
2936
build:
3037
name: Windows installer

.github/workflows/installers-conda.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,24 @@ on:
1717
types:
1818
- created
1919

20+
push:
21+
tags:
22+
- v*pre*
23+
2024
concurrency:
2125
group: installers-conda-${{ github.ref }}
2226
cancel-in-progress: true
2327

2428
name: Create conda-based installers for Windows, macOS, and Linux
2529

30+
env:
31+
IS_PRE: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
32+
2633
jobs:
2734
build-noarch-pkgs:
2835
name: Build ${{ matrix.pkg }}
2936
runs-on: ubuntu-latest
30-
if: github.event_name != 'release'
37+
if: github.event_name == 'pull_request'
3138
strategy:
3239
matrix:
3340
pkg: ["python-lsp-server", "qdarkstyle", "qtconsole"]
@@ -82,7 +89,7 @@ jobs:
8289
"
8390
python_version="'3.9'"
8491
85-
if [[ ${GITHUB_EVENT_NAME} != 'release' ]]; then
92+
if [[ ${GITHUB_EVENT_NAME} == 'pull_request' ]]; then
8693
target_platform=$target_platform", 'win-64'"
8794
include=$include",{'os': 'windows-latest', 'target-platform': 'win-64'}"
8895
fi
@@ -152,7 +159,7 @@ jobs:
152159
env
153160
154161
- name: Download Local Conda Packages
155-
if: github.event_name != 'release'
162+
if: github.event_name == 'pull_request'
156163
uses: actions/download-artifact@v3
157164
with:
158165
path: ${{ env.ARTIFACTS_PATH }}
@@ -175,13 +182,13 @@ jobs:
175182
- name: Build ${{ matrix.target-platform }} conda packages
176183
run: |
177184
pkgs=("spyder")
178-
if [[ $GITHUB_EVENT_NAME != "release" ]]; then
185+
if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then
179186
pkgs+=("spyder-kernels")
180187
fi
181188
python build_conda_pkgs.py --build ${pkgs[@]}
182189
183190
- name: Create Keychain
184-
if: github.event_name == 'release' && runner.os == 'macOS'
191+
if: (github.event_name == 'release' || env.IS_PRE == 'true') && runner.os == 'macOS'
185192
run: |
186193
./certkeychain.sh "${MACOS_CERTIFICATE_PWD}" "${MACOS_CERTIFICATE}" "${MACOS_INSTALLER_CERTIFICATE}"
187194
CNAME=$(security find-identity -p codesigning -v | pcregrep -o1 "\(([0-9A-Z]+)\)")
@@ -219,7 +226,7 @@ jobs:
219226
fi
220227
221228
- name: Notarize package installer
222-
if: github.event_name == 'release' && runner.os == 'macOS'
229+
if: (github.event_name == 'release' || env.IS_PRE == 'true') && runner.os == 'macOS'
223230
run: ./notarize.sh -p $APPLICATION_PWD $PKG_FILE
224231

225232
- name: Upload Artifact

RELEASE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,17 @@ To release a new version of Spyder you need to follow these steps:
128128

129129
* Merge this PR following the procedure mentioned on [`MAINTENANCE.md`](MAINTENANCE.md)
130130

131+
### Check release candidate
132+
133+
* Update version in `__init__.py` (set release version, remove 'dev0', add 'preX'), then
134+
135+
git add .
136+
git commit -m "Release X.X.XpreX"
137+
git tag vX.X.XpreX
138+
git push upstream --tags
139+
140+
* If workflows succeed, proceed to steps to publish the release; otherwise merge a fix PR and repeat previous steps with incremented 'preX'
141+
131142
## To do the release
132143

133144
* Close the current milestone on Github

0 commit comments

Comments
 (0)