From d1caa236e0630cc755ba4c4ef20473ea92012183 Mon Sep 17 00:00:00 2001 From: Stephen L Arnold Date: Tue, 4 May 2021 12:18:56 -0700 Subject: [PATCH] add missing sdist job and artifact check to workflows, bump version Signed-off-by: Stephen L Arnold --- .github/workflows/main.yml | 14 ++++++++++++++ .github/workflows/release.yml | 29 +++++++++++++++++++++++------ conda.recipe/meta.yaml | 2 +- setup.py | 4 ++-- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd68e1a..a9bc217 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,3 +82,17 @@ jobs: with: path: dist/*.tar.gz + check_artifacts: + needs: [build_sdist, build_wheels] + defaults: + run: + shell: bash + name: Check artifacts are correct + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v2 + + # note wheels should be in subdirectory + - name: Check number of downloaded artifacts + run: ls -R diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fac129b..848fdbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,11 +59,30 @@ jobs: - uses: actions/upload-artifact@v2 with: - name: cibw-wheels path: ./wheelhouse/*.whl + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.8' + + - name: Build sdist + run: | + pip install pep517 + python -m pep517.build -s . + + - uses: actions/upload-artifact@v2 + with: + path: dist/*.tar.gz + create_release: - needs: [cibw_wheels] + needs: [build_sdist, cibw_wheels] runs-on: ubuntu-20.04 steps: @@ -84,8 +103,6 @@ jobs: # download all artifacts to project dir - uses: actions/download-artifact@v2 - with: - path: dist - name: Generate changes file uses: sarnold/gitchangelog-action@master @@ -99,7 +116,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ env.VERSION }} - name: Release v${{ env.VERSION }} + name: Release ${{ env.VERSION }} body_path: CHANGES.md draft: false prerelease: false @@ -110,4 +127,4 @@ jobs: with: user: __token__ password: ${{ secrets.pypi_password }} - packages_dir: dist/cibw-wheels/ + packages_dir: artifact/ diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 8f91b80..f4b6bcc 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pyre2" %} -{% set version = "0.3.5" %} +{% set version = "0.3.6" %} package: name: {{ name|lower }} diff --git a/setup.py b/setup.py index 6d25c87..87c65b2 100755 --- a/setup.py +++ b/setup.py @@ -9,8 +9,8 @@ from setuptools.command.build_ext import build_ext -# update the version both here and in conda.recipe/meta.yaml -__version__ = '0.3.5' +# update the release version both here and in conda.recipe/meta.yaml +__version__ = '0.3.6' # Convert distutils Windows platform specifiers to CMake -A arguments PLAT_TO_CMAKE = {