-
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 5 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,86 @@ | ||
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/download-artifact@v4 | ||
with: | ||
patterns: 'PartSeg_bundle_*' | ||
path: pyinstaller | ||
merge-multiple: true | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- 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 |
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