-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from priyanshuone6/release
Add release workflow
- Loading branch information
Showing
3 changed files
with
72 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,64 @@ | ||
name: Build and publish package to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: 'Deployment target. Can be "pypi" or "testpypi"' | ||
default: 'pypi' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: pip install wheel | ||
|
||
- name: Build package | ||
run: python setup.py sdist --formats=gztar bdist_wheel | ||
|
||
- name: Upload package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: files | ||
path: ./dist/ | ||
if-no-files-found: error | ||
|
||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: files | ||
path: dist | ||
|
||
- name: Publish on PyPI | ||
if: github.event.inputs.target == 'pypi' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
packages_dir: dist/ | ||
|
||
- name: Publish on TestPyPI | ||
if: github.event.inputs.target == 'testpypi' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TESTPYPI_TOKEN }} | ||
packages_dir: dist/ | ||
repository_url: https://test.pypi.org/legacy/ |
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 |
---|---|---|
|
@@ -39,4 +39,4 @@ | |
from .solvers import generic_actor | ||
from .solvers import ray_actor | ||
|
||
__version__ = "0.2.1" | ||
__version__ = "0.3" |
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