Skip to content

Commit

Permalink
Single conda-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Mar 20, 2024
1 parent bf5c445 commit c3b80f8
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
name: Waiting Room
runs-on: ubuntu-latest
needs: [conda_build, pip_install, npm_build]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
environment:
name: publish
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
# environment:
# name: publish
steps:
- run: echo "All builds have finished, have been approved, and ready to publish"

Expand Down Expand Up @@ -60,23 +60,16 @@ jobs:
if: always()
with:
name: conda
path: ${{ env.CONDA_FILE }}
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: always()
with:
name: conda-core
path: ${{ env.CONDA_CORE_FILE }}
path: |
${{ env.CONDA_FILE }}
${{ env.CONDA_CORE_FILE }}
if-no-files-found: error

conda_publish:
name: Publish Conda - ${{ matrix.conda-name }}
runs-on: ubuntu-latest
needs: [conda_build, waiting_room]
strategy:
matrix:
conda-name: [geoviews-core, geoviews]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: [conda_build] # , waiting_room]
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -85,22 +78,27 @@ jobs:
- name: Set environment variables
run: |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "CONDA_FILE=$(ls dist/${{ matrix.conda-name }}*.tar.bz2)" >> $GITHUB_ENV
- uses: conda-incubator/setup-miniconda@v2
echo "CONDA_FILE=$(ls dist/*.tar.bz2 | grep -v core)" >> $GITHUB_ENV
echo "CONDA_CORE_FILE=$(ls dist/*-core-*.tar.bz2)" >> $GITHUB_ENV
- name: check
run : |
echo $CONDA_FILE
echo $CONDA_CORE_FILE
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
- name: conda setup
run: |
conda install -y anaconda-client
- name: conda dev upload
if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')
run: |
anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev $CONDA_FILE
- name: conda main upload
if: (!(contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')))
run: |
anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev --label=main $CONDA_FILE
# - name: conda dev upload
# if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')
# run: |
# anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev $CONDA_FILE
# - name: conda main upload
# if: (!(contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')))
# run: |
# anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev --label=main $CONDA_FILE
#
pip_build:
name: Build PyPI
runs-on: "ubuntu-latest"
Expand Down

0 comments on commit c3b80f8

Please sign in to comment.