Skip to content

Commit

Permalink
added ci to published release to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
wsavran committed Feb 4, 2022
1 parent 375e63d commit 90fde27
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and upload to PyPI

# Only build on tagged releases
on:
push:
tags:
- '*'

jobs:
build:
name: Build and upload sdist
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: csep-dev
python-version: '3.10'
channels: conda-forge

- name: Install dependencies
run: |
conda env update --file requirements.yml
conda info -a
conda list
- name: Create sdist
run: |
python setup.py check
python setup.py sdist

- name: Publish Package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_upload_token }}

0 comments on commit 90fde27

Please sign in to comment.