Skip to content

Commit

Permalink
Merge pull request #139 from XAITK/dev/hotfix-from-master
Browse files Browse the repository at this point in the history
Hotfix from master for publish workflow.
  • Loading branch information
bjrichardwebster authored Jun 19, 2023
2 parents a3ebf59 + d34ec5a commit 50bf858
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
if: github.repository_owner == 'XAITK'
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Cache local python environment artifacts for the current python version
# and poetry lockfile hash.
- uses: actions/cache@v2
- uses: actions/cache@v3
id: env-cache
with:
# Confirmed that the `.local` directory doesn't exist until the
Expand All @@ -48,15 +48,27 @@ jobs:
# workflow.
uses: Kitware/SMQTK-Core/.github/actions/python-poetry-setup@master

# Ensure there is alignment with the tag reference and the reported
# version of the package
- name: Ensure synchronized pacakge and ref
run: |
PACKAGE_VERSION="v$(poetry version -s)"
if [[ "${{ github.ref_name }}" != "${PACKAGE_VERSION}" ]]
then
echo "ERROR: Git tag reference and package version are NOT synonymous."
echo " Package version: ${PACKAGE_VERSION}"
echo " Git ref name : ${{ github.ref_name }}"
exit 1
fi
- name: Publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN}}
run: |
if [[ -z "$POETRY_PYPI_TOKEN_PYPI" ]]
then
echo "ERROR: Input pypi token was blank. Did you forget to set the appropriate secret?"
exit 1
fi
echo "Publishing new tag: ${{ github.ref_name }}"
git checkout ${{ github.ref_name }}
poetry publish --build
2 changes: 2 additions & 0 deletions docs/release_notes/v0.7.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ CI
* Added explicit use of codecov token to facilitate successful coverage
submission.

* Updated publish/release CI workflow.

Dependencies

* Updated ``notebook`` dependency due to a vulnerability alert.
Expand Down

0 comments on commit 50bf858

Please sign in to comment.