Publish #14
Workflow file for this run
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
name: Publish | |
on: | |
release: | |
types: | |
- created | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Get Poetry | |
uses: abatilo/[email protected] | |
- name: Set Version | |
run: poetry version $(echo ${{ github.event.release.tag_name }} | cut -d 'v' -f 2) | |
- name: Build Package | |
run: poetry build | |
- name: Check Build | |
run: pip install dist/*.whl | |
- name: Set POETRY_VERSION environment variable | |
run: echo "POETRY_VERSION=$(poetry version -s)" >> $GITHUB_ENV | |
- name: Build and Publish Conda Package | |
uses: amauryval/[email protected] | |
with: | |
CondaDir: 'conda-recipe' | |
Channels: 'conda-forge abrahammurciano' | |
Platforms: 'noarch' | |
CondaUsername: ${{ secrets.ANACONDA_USERNAME }} | |
CondaPassword: ${{ secrets.ANACONDA_PASSWORD }} | |
- name: Publish Pip Package | |
run: poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} |