From 90fde27fa0324b0f7b8a9d880df3d17a98164c90 Mon Sep 17 00:00:00 2001 From: William Savran Date: Fri, 4 Feb 2022 14:11:52 -0800 Subject: [PATCH] added ci to published release to pypi --- .github/workflows/publish-pypi.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/publish-pypi.yml diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 00000000..689a0c63 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -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 }} \ No newline at end of file