Skip to content

Commit

Permalink
Adding deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed May 26, 2023
1 parent e287e40 commit 4783d1f
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ jobs:
name: wheels
path: dist/sphecerix-*.whl

# publish-pypi:
# name: Upload release to PyPI
# if: github.ref == 'refs/heads/master'
# needs: build-pypi
# runs-on: ubuntu-latest
# environment:
# name: pypi
# url: https://pypi.org/p/sphecerix
# permissions:
# id-token: write
# steps:
# - name: Retrieve packages
# uses: actions/download-artifact@v3
# with:
# name: wheels
# path: wheelhouse
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: wheelhouse/
publish-pypi:
name: Upload release to PyPI
if: github.ref == 'refs/heads/master'
needs: build-pypi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sphecerix
permissions:
id-token: write
steps:
- name: Retrieve packages
uses: actions/download-artifact@v3
with:
name: wheels
path: wheelhouse
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/

build-anaconda:
runs-on: ubuntu-latest
Expand All @@ -74,31 +74,31 @@ jobs:
name: anaconda-packages
path: /usr/local/conda-bld/noarch/sphecerix-*.tar.bz2

# publish-anaconda:
# name: Upload release to Anaconda
# if: github.ref == 'refs/heads/master'
# needs: build-anaconda
# runs-on: ubuntu-latest
# container: conda/miniconda3
publish-anaconda:
name: Upload release to Anaconda
if: github.ref == 'refs/heads/master'
needs: build-anaconda
runs-on: ubuntu-latest
container: conda/miniconda3

# environment:
# name: anaconda
# url: https://anaconda.org/ifilot/sphecerix
environment:
name: anaconda
url: https://anaconda.org/ifilot/sphecerix

# steps:
# - name: Prepare deployment environment
# run: conda install -y conda-build anaconda-client
# - name: Checkout repo
# uses: actions/checkout@v3
# - name: Retrieve packages
# uses: actions/download-artifact@v3
# with:
# name: anaconda-packages
# path: packages
# - name: Publish to anaconda
# shell: bash -l {0}
# env:
# INPUT_ANACONDATOKEN: ${{ secrets.ANACONDA_TOKEN }}
# run: |
# export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN
# anaconda upload packages/*.tar.bz2
steps:
- name: Prepare deployment environment
run: conda install -y conda-build anaconda-client
- name: Checkout repo
uses: actions/checkout@v3
- name: Retrieve packages
uses: actions/download-artifact@v3
with:
name: anaconda-packages
path: packages
- name: Publish to anaconda
shell: bash -l {0}
env:
INPUT_ANACONDATOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN
anaconda upload packages/*.tar.bz2

0 comments on commit 4783d1f

Please sign in to comment.