forked from alchemistry/alchemlyb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set a strict python minimum version for install, add automated pypi d…
…eployment (alchemistry#194) * Set a strict python minimum version for install (fix alchemistry#193) * add deploy workflow for automatic uploads to testpypi (release tag) and pypi (GitHub release) * clean up CI file * update AUTHORS and CHANGELOG * update release management notes https://github.com/alchemistry/alchemlyb/wiki/Developer-Guide#release-management
- Loading branch information
Showing
6 changed files
with
83 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
release: | ||
types: | ||
- published | ||
|
||
|
||
concurrency: | ||
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}" | ||
cancel-in-progress: true | ||
|
||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
|
||
jobs: | ||
build_wheels: | ||
environment: deploy | ||
if: "github.repository == 'alchemistry/alchemlyb'" | ||
name: Build pure Python wheel and tarball | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: setup_miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: 3.8 | ||
auto-update-conda: true | ||
add-pip-as-python-dependency: true | ||
architecture: x64 | ||
|
||
- name: install_deps | ||
run: | | ||
python -m pip install build | ||
- name: build | ||
run: | | ||
python -m build --sdist --wheel --outdir dist/ | ||
- name: publish_testpypi | ||
# Upload to testpypi on every tag | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: publish_pypi | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
[bdist_wheel] | ||
universal=1 | ||
|
||
[versioneer] | ||
VCS = git | ||
style = pep440 | ||
versionfile_source = src/alchemlyb/_version.py | ||
versionfile_build = alchemlyb/_version.py | ||
tag_prefix = | ||
parentdir_prefix = alchemlyb- | ||
parentdir_prefix = alchemlyb- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters