-
Notifications
You must be signed in to change notification settings - Fork 52
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: Added github action release workflow #563
Conversation
|
name: Build and deploy | ||
|
||
on: | ||
workflow_dispatch: |
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.
To enable running manually from the Action page
env: | ||
READTHEDOCS: "True" # To skip checking that fabio is installed locally |
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.
This could be remove if the doc's conf.py
was not checking for place where fabio
is installed.
- os: macos-14 | ||
cibw_archs: "arm64" | ||
macos_target: "11.0" |
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.
Use macos M1 machines.
environment: | ||
name: pypi |
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.
This environment name needs to be declared in pypi.org
name: pypi | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'release' && github.event.action == 'published' |
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.
Run only when triggered by a published release
import fabio | ||
project_dir = os.path.abspath(os.path.join(__file__, "..", "..", "..")) | ||
build_dir = os.path.abspath(fabio.__file__) | ||
if on_rtd: | ||
if os.environ.get('READTHEDOCS') == 'True': | ||
print("On Read The Docs") | ||
print("build_dir", build_dir) | ||
print("project_dir", project_dir) |
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.
Is the whole try/except block needed.
One need to make sure to install the same version of fabio
as the one that is used to build the doc, but is it worth preventing generating the doc from an installed version?
if not on_rtd: | ||
try: | ||
import sphinx_rtd_theme | ||
extensions.append('sphinx_rtd_theme') | ||
except: | ||
print("sphinx_rtd_theme is not available") |
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.
readthedocs no longer set the theme automatically
For an example of workflow run, see: https://github.com/t20100/fabio/actions/runs/8633327052 (Artifacts can be downloaded at the bottom of the web page) Note: The tests of the sdist failed on a test with randomly generated data. |
Let's give it a try to build a release |
This run https://github.com/t20100/fabio/actions/runs/8648448087 provides zip with generated wheels for testing |
This PR adds a release workflow that is triggered when publishing a release in github and that can be run manually.
This workflow:
To make it work it requires to:
This is adapted from cibuildwheel documentation:
It's similar to silx's release.yml and hdf5plugin's release.yml