Skip to content

Commit

Permalink
Add wheel upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed May 1, 2024
1 parent 2368f1b commit 82cdac7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,26 @@ jobs:

upload:
needs: build
if: ${{github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/heads/release') == true)}}
# if: ${{github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/heads/release') == true)}}
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
shell: 'bash -l {0}'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}

- name: Download wheels artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}

- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
Expand All @@ -91,7 +96,7 @@ jobs:
run: echo "PACKAGE_VERSION=$(basename ${{ env.PACKAGE_NAME }}-*.tar.bz2 | sed 's/^${{ env.PACKAGE_NAME }}-\([^-]*\).*/\1/')" >> $GITHUB_ENV

- name: Upload
run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --force --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2

- name: Upload Wheels
run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.MODULE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }}
run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --force --user dppy --label dev ${{ env.MODULE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }}

0 comments on commit 82cdac7

Please sign in to comment.