From a999761d67070799806da4b102feebc3df905df6 Mon Sep 17 00:00:00 2001 From: David Turner Date: Mon, 30 Oct 2023 22:12:54 -0400 Subject: [PATCH] Dry run anaconda upload. --- .github/workflows/main.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 19da3843..0f0705ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, macos-latest] + os: [ubuntu-latest, macos-latest] python-version: ['3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2 @@ -90,7 +90,16 @@ jobs: ls -l ${{ steps.build-package.outputs.PACKAGE_PATH }} - name: Upload to Anaconda - if: github.event_name == 'release' && github.event.action == 'published' + # if: github.event_name == 'release' && github.event.action == 'published' run: | - export CONDA_HOME=$CONDA - anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload ${{ steps.build-package.outputs.PACKAGE_PATH }} --force \ No newline at end of file + export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }} + SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" + for dirname in ${{ steps.build-package.outputs.PACKAGE_PATH }}/*; do + if [ -d "$dirname" ]; then + for filename in $dirname/*; do + if [ "${filename: -8}" == ".tar.bz2" ]; then + echo "anaconda upload $filename" + # anaconda upload $filename + fi + done + fi \ No newline at end of file