Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jan 21, 2025
1 parent 1b58ec5 commit 4ddb25c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
run: |
current_version=$(poetry version -s)
base_version=$(echo "$current_version" | grep -oE '^[0-9]+\.[0-9]+\.[0-9]+')
pyproject_name=$(poetry version | awk '{print $1}')
# Version calculation based on branch
if [[ "${{ github.ref }}" =~ ^refs/heads/(issue|feature|dependabot)/ ]]; then
new_version="${base_version%%-*}+$(git rev-parse --short HEAD)"
Expand All @@ -86,6 +87,7 @@ jobs:
fi
echo "new_version=${new_version}" >> $GITHUB_ENV
echo "pyproject_name=${pyproject_name}" >> $GITHUB_ENV
poetry version ${new_version}
- name: Run Snyk as a blocking step
Expand Down Expand Up @@ -193,8 +195,9 @@ jobs:
- name: Wait for package
if: |
steps.pypi-test-publish.conclusion == 'success' ||
steps.pypi-publish.conclusion == 'success'
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/heads/release/')
run: |
pip install tenacity logging
python3 ${GITHUB_WORKSPACE}/.github/workflows/wait-for-pypi.py ${{env.pyproject_name}}[harmony]==${{ env.new_version }}
Expand Down

0 comments on commit 4ddb25c

Please sign in to comment.