From caabe4a3c8e8961f0a6c4460e4bac5c323fbf92d Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sun, 19 Apr 2020 17:56:37 +0100 Subject: [PATCH] fix test pip deployments --- .github/workflows/main.yml | 8 +++++--- scripts/release | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9494398..76ee8cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,10 @@ name: CI on: [push] +env: + # useful for scripts & sometimes tests to know + CI: true + jobs: build: runs-on: ubuntu-latest @@ -10,8 +14,6 @@ jobs: strategy: matrix: python-version: [3.6, 3.7, 3.8] - # TODO shit. matrix is going to prevent from twine deployments because of version conflicts?? - # add 'and' clause?? steps: # fuck me. https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path @@ -32,7 +34,7 @@ jobs: pypi: runs-on: ubuntu-latest - needs: build + needs: [build] # add all other jobs here steps: - run: echo "::add-path::$HOME/.local/bin" diff --git a/scripts/release b/scripts/release index 2f12eff..c744b56 100755 --- a/scripts/release +++ b/scripts/release @@ -5,6 +5,7 @@ from pathlib import Path from subprocess import check_call import shutil +is_ci = os.environ.get('CI') is not None def main(): import argparse @@ -19,6 +20,10 @@ def main(): root = Path(__file__).absolute().parent.parent os.chdir(root) # just in case + if is_ci: + # see https://github.com/actions/checkout/issues/217 + check_call('git fetch --prune --unshallow'.split()) + dist = root / 'dist' if dist.exists(): shutil.rmtree(dist)