diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6367fc08..d3f22bce4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,6 @@ name: CI -on: - push: - pull_request: - branches: - # build only on forks, PRs from the same repo are covered by "push" - - '**:**' +on: [push, pull_request] env: MPLBACKEND: Agg diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7db434427..16000c87e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,13 +6,13 @@ on: - 'v*' jobs: - tests: + deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - # make sure we have version info - - run: git fetch --tags + with: + fetch-depth: 0 + - name: Set up Python uses: actions/setup-python@v2 @@ -22,7 +22,9 @@ jobs: - name: Install dependencies run: | python --version - pip install -U pip setuptools wheel + pip install -U pip setuptools wheel setuptools_scm[toml] + # make sure we have the version, grep will exit with 1 if it finds 0.0.0 + python setup.py --version | grep -v '0.0.0' python setup.py sdist bdist_wheel - name: Publish package diff --git a/setup.cfg b/setup.cfg index 4381fb96b..f6c524848 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,10 +24,11 @@ classifiers = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 -requires-dist = setuptools +requires_dist = setuptools [options] python_requires = >=3.6 +setup_requires = setuptools_scm[toml] [flake8] exclude=