-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add workflow for releases from GHA #1117
Changes from 14 commits
a2dc9a6
4a43d51
98c9702
929a107
3cfa7b8
172e8be
e10b6cc
4863e4e
0208fc3
2bba326
e0d66d5
56e02a1
60c3715
de828a8
66f89b0
44f58b7
df13613
de2ffcd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: Make release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
paths: | ||
- .github/workflows/make_release.yml | ||
|
||
jobs: | ||
build_wheels: # This job builds the wheels | ||
runs-on: ubuntu-latest | ||
permissions: | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: hynek/build-and-inspect-python-package@v2 | ||
with: | ||
attest-build-provenance-github: 'true' | ||
|
||
|
||
build_pyinstaller_bundle: | ||
name: Build PyInstaller bundle | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-20.04", "windows-2019", "macos-13"] #, "macos-14"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- uses: tlambert03/setup-qt-libs@v1 | ||
- name: Install Windows OpenGL | ||
if: runner.os == 'Windows' | ||
run: | | ||
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | ||
powershell gl-ci-helpers/appveyor/install_opengl.ps1 | ||
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1} | ||
shell: powershell | ||
- name: Install PartSeg | ||
run: python -m pip install -e .[pyinstaller] -c requirements/constraints_py3.10.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pin the versions of dependencies. The - name: Install PartSeg
run: python -m pip install -e .[pyinstaller] -c requirements/constraints_py3.10.txt
+ run: python -m pip install -r requirements.txt
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it pin using constraints file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Czaki, you are correct. The Analysis chainScripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Display the contents of the constraints file to verify if it pins the versions of dependencies.
cat requirements/constraints_py3.10.txt
Length of output: 8043 Learnings added
|
||
|
||
- name: Build PartSeg bundle | ||
run: python build_utils/create_and_pack_executable.py | ||
|
||
- name: Publish PartSeg bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: PartSeg_bundle_${{ matrix.os }} | ||
path: dist2 | ||
|
||
- name: Test PartSeg bundle | ||
uses: aganders3/headless-gui@v2 | ||
with: | ||
run: dist/PartSeg/PartSeg _test | ||
|
||
|
||
|
||
create_release: | ||
name: Create release | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
needs: | ||
- build_wheels | ||
- build_pyinstaller_bundle | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
patterns: 'PartSeg_bundle_*' | ||
path: pyinstaller | ||
merge-multiple: true | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
- name: generate release notes | ||
run: | | ||
RELEASE_NOTES=$(python build_utils/cut_changelog.py) | ||
echo "${RELEASE_NOTES}" | ||
echo "name=contents=${RELEASE_NOTES}" >> $GITHUB_ENV | ||
|
||
- name: Create Release | ||
uses: "softprops/action-gh-release@v2" | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
tag_name: ${{ github.ref }} | ||
name: ${{ env.tag }} | ||
body: ${{ steps.release_notes.outputs.contents }} | ||
draft: false | ||
prerelease: ${{ contains(github.ref, 'rc') }} | ||
files: | | ||
dist/* | ||
pyinstaller/* | ||
|
||
- name: Publish package distributions to PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,108 @@ | ||||||||
# Changelog | ||||||||
|
||||||||
## 0.15.3 - 2024-07-03 | ||||||||
|
||||||||
### 🚀 Features | ||||||||
|
||||||||
- Pydantic 2 compatybility (#1084) | ||||||||
|
||||||||
### 🐛 Bug Fixes | ||||||||
|
||||||||
- Fix rendering icons in colormap preview (#1040) | ||||||||
- Fix test for validation length of message for sentry-sdk 2.0 release (#1098) | ||||||||
- When fix reader check lowercase extension for validate compatybility (#1097) | ||||||||
- Fix napari 0.5.0 compatybility (#1116) | ||||||||
|
||||||||
### 🚜 Refactor | ||||||||
|
||||||||
- Fix Qt flags (#1041) | ||||||||
- Fix qt flags in roi mask code (#1042) | ||||||||
- Fix qt flags in roi analysis (#1043) | ||||||||
- Migrate from setup.cfg to `pyproject.toml` (#1070) | ||||||||
|
||||||||
### 📚 Documentation | ||||||||
|
||||||||
- Allow to use newer release of build docs dependencies (#1057) | ||||||||
|
||||||||
### 🧪 Testing | ||||||||
|
||||||||
- \[Automatic\] Constraints upgrades: `imagecodecs`, `imageio`, `ipykernel`, `ipython`, `numpy`, `oiffile`, `pandas`, `psygnal`, `pyinstaller`, `qtconsole`, `qtpy`, `sentry-sdk`, `simpleitk`, `superqt`, `tifffile`, `xlsxwriter` (#1020) | ||||||||
- \[Automatic\] Constraints upgrades: `h5py`, `imageio`, `ipython`, `numpy`, `packaging`, `pydantic`, `pyinstaller`, `pyqt5`, `scipy`, `sentry-sdk`, `superqt`, `tifffile`, `xlsxwriter` (#1027) | ||||||||
- \[Automatic\] Constraints upgrades: `imageio`, `magicgui`, `xlsxwriter` (#1030) | ||||||||
- \[Automatic\] Constraints upgrades: `ipykernel`, `pandas`, `qtpy` (#1032) | ||||||||
- \[Automatic\] Constraints upgrades: `imageio`, `ipykernel`, `ipython`, `numpy`, `pandas`, `psygnal`, `pygments`, `pyinstaller`, `qtconsole`, `scipy`, `sentry-sdk`, `simpleitk` (#1035) | ||||||||
- \[Automatic\] Constraints upgrades: `imagecodecs`, `imageio`, `ipykernel`, `magicgui`, `pandas`, `pyinstaller`, `qtawesome`, `sentry-sdk`, `tifffile` (#1048) | ||||||||
- \[Automatic\] Constraints upgrades: `ipykernel`, `numpy`, `pandas`, `partsegcore-compiled-backend`, `pydantic`, `scipy`, `sentry-sdk` (#1058) | ||||||||
- Improve test of PartSegImage (#1072) | ||||||||
- Improve test suite for `PartSegCore` (#1077) | ||||||||
- \[Automatic\] Constraints upgrades: `imageio`, `ipykernel`, `local-migrator`, `napari`, `numpy`, `pandas`, `partsegcore-compiled-backend`, `pyinstaller`, `sentry-sdk`, `tifffile`, `vispy`, `xlsxwriter` (#1063) | ||||||||
- \[Automatic\] Constraints upgrades: `magicgui`, `packaging`, `psygnal`, `pyinstaller`, `sentry-sdk`, `superqt` (#1086) | ||||||||
- \[Automatic\] Constraints upgrades: `psygnal`, `pydantic`, `sentry-sdk`, `vispy` (#1090) | ||||||||
- \[Automatic\] Constraints upgrades: `h5py`, `ipykernel`, `mahotas`, `pandas`, `psygnal`, `pydantic`, `pyinstaller`, `qtawesome`, `scipy`, `sentry-sdk`, `superqt` (#1092) | ||||||||
- \[Automatic\] Constraints upgrades: `imageio`, `tifffile` (#1100) | ||||||||
- \[Automatic\] Constraints upgrades: `pydantic`, `sentry-sdk`, `superqt`, `tifffile` (#1102) | ||||||||
- \[Automatic\] Constraints upgrades: `psygnal`, `pygments`, `qtconsole`, `sentry-sdk`, `superqt`, `tifffile` (#1105) | ||||||||
- \[Automatic\] Constraints upgrades: `imagecodecs`, `magicgui`, `oiffile`, `openpyxl`, `packaging`, `pydantic`, `pyinstaller`, `requests`, `scipy`, `sentry-sdk`, `superqt`, `sympy`, `tifffile`, `vispy` (#1107) | ||||||||
|
||||||||
### ⚙️ Miscellaneous Tasks | ||||||||
|
||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1019) | ||||||||
- Remove plugin page preview as it is no longer maintained (#1021) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1022) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1026) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1031) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1034) | ||||||||
- Use new semgrep configuration (#1039) | ||||||||
- Upload raw coverage information (#1044) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1036) | ||||||||
- Run coverage upload in separate steep (#1053) | ||||||||
- Generate local report in `Tests` workflow and use proper script for fetch report (#1054) | ||||||||
- Move coverage back to main workflow (#1055) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1056) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1059) | ||||||||
- Update `actions/upload-artifact` and `actions/download-artifact` from 3 to 4 (#1062) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1064) | ||||||||
- Group actions update (#1065) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1068) | ||||||||
- Remove requirement of 2 builds upload to codecov.io (#1073) | ||||||||
- Re add tests to coverage report (#1074) | ||||||||
- Switch from setup.cfg to pyproject.toml in workflows (#1076) | ||||||||
- Fix compiling pyinstaller pre-deps (#1075) | ||||||||
- Add codespell to pre-commit and fix pointed bugs (#1078) | ||||||||
- Add new ruff rules and apply them (#1079) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1080) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1081) | ||||||||
- Fix upgrade depenecies workflow (#1083) | ||||||||
- Block using `mpmath==1.4.0a0` and `sentry-sdk` 2.0.0a1/a2 in pre-test (#1085) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1089) | ||||||||
- Fix jupyter failing test by using constraints (#1093) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1091) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1096) | ||||||||
- Add python 3.12 testing (#1087) | ||||||||
- Exclude pyside2 on python 3.11 and 3.12 from testing (#1099) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1101) | ||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1103) | ||||||||
- Bump macos runners to macos-13 (both azure and GHA) (#1113) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammar: Capitalize "macOS". The operating system from Apple is written “macOS”. - Bump macos runners to macos-13 (both azure and GHA)
+ Bump macOS runners to macOS-13 (both azure and GHA) Committable suggestion
Suggested change
ToolsLanguageTool
|
||||||||
- \[pre-commit.ci\] pre-commit autoupdate (#1108) | ||||||||
- Remove pyqt5 from constraints (#1118) | ||||||||
|
||||||||
### 🛡️ Security | ||||||||
|
||||||||
- *(deps)* Bump actions/checkout from 3 to 4 (#1029) | ||||||||
- *(deps)* Bump conda-incubator/setup-miniconda from 2 to 3 (#1038) | ||||||||
- *(deps)* Bump aganders3/headless-gui from 1 to 2 (#1047) | ||||||||
- *(deps)* Bump actions/checkout from 3 to 4 (#1045) | ||||||||
- *(deps)* Bump hynek/build-and-inspect-python-package from 1 to 2 (#1050) | ||||||||
- *(deps)* Bump actions/setup-python from 4 to 5 (#1046) | ||||||||
- *(deps)* Bump github/codeql-action from 2 to 3 (#1051) | ||||||||
- *(deps)* Bump peter-evans/create-pull-request from 5 to 6 (#1067) | ||||||||
- *(deps)* Bump codecov/codecov-action from 3 to 4 (#1066) | ||||||||
|
||||||||
### Build | ||||||||
|
||||||||
- Fix not bundling `Font Awesome 6 Free-Solid-900.otf` file to executable (#1114) | ||||||||
- Update readme and release to point to GitHub releases (#1115) | ||||||||
|
||||||||
## 0.15.2 - 2023-08-28 | ||||||||
|
||||||||
### Bug Fixes | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a step to set up Python.
The job is missing a step to set up the Python environment before using
hynek/build-and-inspect-python-package@v2
. This could lead to issues if the correct Python version is not available.Committable suggestion