diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29f57d6..9d66ba8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,16 @@ jobs: python setup.py sdist - name: Publish distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} verbose: true + - name: Check published package + if: startsWith(github.ref, 'refs/tags') + run: | + mamba create -n testenv python=3 pip + conda activate testenv + pip install --force-reinstall --no-cache cppimport + pushd tests + python -c 'import cppimport; assert(cppimport.imp("mymodule").add(1,2) == 3);' + popd diff --git a/release b/release index 2bd8f71..a6cdfb1 100644 --- a/release +++ b/release @@ -1,14 +1,12 @@ GIT: git commit -m "yy.mm.dd" -git tag yy.mm.dd +git tag -a 22.08.02 -m "22.08.02" git push --atomic origin main yy.mm.dd wait for github action to complete create release on github -SANITY TEST: -open new terminal -mamba create -n testenv python=3 pip -conda activate testenv -pip install --force-reinstall --no-cache cppimport -cd tests -python -c 'import cppimport; assert(cppimport.imp("mymodule").add(1,2) == 3);' +remaining tasks to automate in the publish CI workflow: +- publish to test pypi first +- then, check the published package +- then, republish to real pypi +- then, run the automatic release action.