Skip to content

Publish

Publish #14

Workflow file for this run

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 }}