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

Fully automated releases, including tests and github release. #80

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 6 additions & 8 deletions release
Original file line number Diff line number Diff line change
@@ -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.