Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix publishing new tags to TestPyPI @ GHA #873

Merged
merged 2 commits into from
Jun 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ jobs:
uses: actions/checkout@v2
with:
# Get shallow Git history (default) for tag creation events
# but have a complete clone for any other workflows
# but have a complete clone for any other workflows.
# Both options fetch tags but since we're going to remove
# one from HEAD in non-create-tag workflows, we need full
# history for them.
fetch-depth: >-
${{
(
Expand All @@ -216,9 +219,6 @@ jobs:
) &&
1 || 0
}}
- name: Get Git tags for SCM versioning to work
run: >-
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Drop Git tags from HEAD for non-tag-create events
if: >-
github.event_name != 'create' ||
Expand All @@ -242,9 +242,15 @@ jobs:
run: python -m tox -p auto --parallel-live -vvvv
- name: Publish to test.pypi.org
if: >-
github.event_name == 'push' &&
github.ref == format(
'refs/heads/{0}', github.event.repository.default_branch
(
github.event_name == 'push' &&
github.ref == format(
'refs/heads/{0}', github.event.repository.default_branch
)
) ||
(
github.event_name == 'create' &&
github.event.ref_type == 'tag'
)
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down