-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an Actions workflow for PyPi and set dependency_links for pymc3
- Loading branch information
1 parent
b9ba712
commit dc92615
Showing
2 changed files
with
51 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: PyPI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- auto-release | ||
pull_request: | ||
branches: [master] | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Build the sdist | ||
run: | | ||
python setup.py sdist | ||
- name: Check that the sdist build installs | ||
run: | | ||
mkdir -p test-sdist | ||
cd test-sdist | ||
python -m venv venv-sdist | ||
venv-sdist/bin/python -m pip install ../dist/pymc3-hmm-* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist/* | ||
|
||
upload_pypi: | ||
name: Upload to PyPI on release | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
- uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_secret }} |
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