Skip to content

Commit

Permalink
change publish to use real pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
jdglaser committed Dec 29, 2023
1 parent 752ac3a commit 47d8e7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ on:

jobs:
test-and-lint:
name: Test and Lint
uses: jdglaser/fast-to-sql/.github/workflows/test-and-lint.yml@master
deploy:
name: Deploy
uses: jdglaser/fast-to-sql/.github/workflows/python-publish.yml@master
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,10 @@ jobs:
pip install -r requirements.txt
- name: Build
run: |
git fetch --tags --quiet
export NEW_TAG=${{ github.event.release.tag_name }}
echo "NEW TAG: ${NEW_TAG}"
export LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "LATEST TAG: ${LATEST_TAG}"
export GIT_BRANCH=${GITHUB_REF#refs/heads/}
echo "GIT BRANCH: ${GIT_BRANCH}"
export GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
echo "GIT HASH: ${GIT_HASH}"
export PYPI_PACKAGE_VERSION=${NEW_TAG:-${LATEST_TAG}+0.${GIT_BRANCH}.${GIT_HASH}}
echo "RESOLVED VERSION: ${PYPI_PACKAGE_VERSION}"
export PYPI_PACKAGE_VERSION=${{ github.event.release.tag_name }}
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
repository-url: https://pypi.org/legacy/

0 comments on commit 47d8e7b

Please sign in to comment.