Skip to content

Commit

Permalink
Merge pull request #911 from mlcommons/scap3yvt-patch-1
Browse files Browse the repository at this point in the history
Ensure all build commands are in single step
  • Loading branch information
sarthakpati authored Jul 28, 2024
2 parents 2695b06 + 6e0e49f commit 5e43783
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 5e43783

Please sign in to comment.