Skip to content

Commit

Permalink
fix action on release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Sep 9, 2021
1 parent 1dd2bb6 commit 75d060c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,17 @@ jobs:
name: pygeoda-${{ matrix.os }}
path: wheelhouse/

- name: Check Release Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=publish::true
fi
- name: Publish to Pypi
if: steps.check-tag.outputs.publish == 'true'
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python3 -m pip install --upgrade twine
python3 -m twine upload wheelhouse/*.whl
- name: Publish Source to Pypi
if: matrix.os == 'macos-latest' && steps.check-tag.outputs.publish == 'true'
if: matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/win-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,11 @@ jobs:
name: pygeoda-${{ matrix.python_ver }}-${{ matrix.msvc_arch }}-win
path: wheelhouse/

- name: Check Release Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=publish::true
fi
- name: Publish to Pypi
if: steps.check-tag.outputs.publish == 'true'
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade twine
python -m twine upload wheelhouse/*.whl

0 comments on commit 75d060c

Please sign in to comment.