diff --git a/.github/actions/publish-package/action.yml b/.github/actions/publish-package/action.yml index f5e9779308e..66d2f12bf6f 100644 --- a/.github/actions/publish-package/action.yml +++ b/.github/actions/publish-package/action.yml @@ -4,6 +4,10 @@ inputs: repository: description: 'Anaconda repository' required: true + default: 'mantidimaging' + repository-old: + description: 'Anaconda repository - old' + required: true default: 'mantid' label: description: 'Label' @@ -12,6 +16,9 @@ inputs: token: description: 'Anaconda API Token' required: true + token-old: + description: 'Anaconda API Token - old' + required: true description: Build conda package runs: @@ -35,8 +42,10 @@ runs: shell: bash -l {0} run: | conda activate build-env - conda config --set anaconda_upload yes + conda config --set anaconda_upload no # if the upload silently fails - check the token expiration. Conda can fail silently! - conda mambabuild --user ${{ inputs.repository }} --token ${{ inputs.token }} --label ${{ inputs.label }} $GITHUB_WORKSPACE/conda |& tee upload.log + conda mambabuild $GITHUB_WORKSPACE/conda + anaconda -t ${{ inputs.token }} upload --user ${{ inputs.repository }} --label ${{ inputs.label }} ${CONDA_PREFIX}/conda-bld/*/mantidimaging*.tar.bz2 |& tee upload.log + anaconda -t ${{ inputs.token-old }} upload --user ${{ inputs.repository-old }} --label ${{ inputs.label }} ${CONDA_PREFIX}/conda-bld/*/mantidimaging*.tar.bz2 # Check that upload completed grep "Upload complete" upload.log diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml index 97ab5ddac69..0484e8b8a34 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda.yml @@ -136,8 +136,8 @@ jobs: # Always label as unstable. Builds of stable releases can be manually labeled to 'main' once tested - name: publish 'unstable' package - if: github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release'))) uses: ./.github/actions/publish-package with: - label: unstable - token: ${{ secrets.ANACONDA_API_TOKEN }} + label: upload-test-mike + token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }} + token-old: ${{ secrets.ANACONDA_API_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e9f8d744428..bdcb33157f8 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -122,8 +122,8 @@ jobs: # Label as 'windows-build-test' for testing purposes. # To re-enable, use the if rule from the conda workflow and change label to 'unstable' after testing - name: publish package - if: github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release'))) uses: ./.github/actions/publish-package with: - label: unstable - token: ${{ secrets.ANACONDA_API_TOKEN }} + label: upload-test-mike + token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }} + token-old: ${{ secrets.ANACONDA_API_TOKEN }}