Skip to content

Commit

Permalink
fix version in test.pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Oct 25, 2022
1 parent 2ada410 commit 9bf04a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ jobs:
- uses: actions/setup-python@v4
- run: pip install -U pip wheel hatch
- run: hatch run docs
- name: Upload to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docs/
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,25 @@ jobs:
with:
python-version: 3.7

- name: Force version for Test PyPI uploads
if: ${{ !startsWith(github.ref, 'refs/tags') }}
- run: pip install -U pip wheel hatch
- if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: |
version=$(hatch version | awk -F+ '{print $1}' | tail -1)
echo SETUPTOOLS_SCM_PRETEND_VERSION=$version >> $GITHUB_ENV
echo version=$version >> $GITHUB_ENV
echo version $version
- run: pip install -U pip wheel hatch
- run: hatch build
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.version }}

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 9bf04a7

Please sign in to comment.