-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #911 from mlcommons/scap3yvt-patch-1
Ensure all build commands are in single step
- Loading branch information
Showing
1 changed file
with
11 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,31 +49,22 @@ jobs: | |
if [[ $currentVer == *"dev"* ]]; then | ||
echo "Nightly will be published" | ||
echo "publish_nightly=true" >> $GITHUB_ENV | ||
datestampnow=$(date +'%Y%m%d') | ||
echo "Install dependencies and set up the environment" | ||
pip install scikit-build | ||
pip install -e . | ||
pip install build | ||
echo __version__ = \"$currentVer$datestampnow\" > ./GANDLF/version.py | ||
echo "Perform the build" | ||
python -m build | ||
else | ||
echo "Nightly will not be published" | ||
echo "publish_nightly=false" >> $GITHUB_ENV | ||
fi | ||
- name: Install dependencies | ||
if: env.publish_nightly | ||
run: | | ||
python -m pip install --upgrade pip==24.0 | ||
pip install scikit-build | ||
pip install -e . | ||
pip install build | ||
- name: Annotate version | ||
if: env.publish_nightly | ||
run: | # Get current canonical version, append current date as an identifier | ||
currentVer=$(grep -oP '__version__ = \K.*' ./GANDLF/version.py) | ||
currentVer=${currentVer//\"} | ||
datestampnow=$(date +'%Y%m%d') | ||
echo __version__ = \"$currentVer$datestampnow\" > ./GANDLF/version.py | ||
- name: Build package | ||
if: env.publish_nightly | ||
run: python -m build | ||
fi | ||
- name: Publish package | ||
if: env.publish_nightly | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
uses: pypa/[email protected] | ||
continue-on-error: true | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |