|
4 | 4 | release: |
5 | 5 | types: [published] |
6 | 6 | push: |
7 | | - branches: [ master ] |
| 7 | + branches: [master] |
8 | 8 | tags: |
9 | 9 | - '**' |
10 | 10 | pull_request: |
11 | | - branches: [ master ] |
12 | | - |
| 11 | + branches: [master] |
| 12 | + |
13 | 13 | jobs: |
14 | 14 | build: |
15 | 15 | runs-on: ubuntu-22.04 |
16 | 16 | steps: |
17 | | - - uses: actions/checkout@v4 |
18 | | - with: |
19 | | - fetch-depth: 0 |
20 | | - - uses: conda-incubator/setup-miniconda@v3 |
21 | | - with: |
22 | | - python-version: 3.7 |
23 | | - mamba-version: "*" |
24 | | - channels: conda-forge, ccpi |
25 | | - conda-remove-defaults: "true" |
26 | | - - run: conda install boa conda-verify |
27 | | - - name: conda build |
28 | | - run: > |
29 | | - conda mambabuild -c conda-forge -c ccpi --python=3.7 --output-folder dist recipe |
30 | | - - name: conda-upload |
31 | | - if: github.ref == startsWith(github.ref, 'refs/tags') |
32 | | - defaults: {run: {shell: 'bash -el {0}', working-directory: dist}} |
33 | | - runs-on: ubuntu-latest |
34 | | - steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + with: |
| 19 | + fetch-depth: 0 # All history for use later with the meta.yaml file for conda-recipes |
| 20 | + |
| 21 | + - uses: conda-incubator/setup-miniconda@v3 |
| 22 | + with: |
| 23 | + python-version: 3.7 |
| 24 | + mamba-version: "*" |
| 25 | + channels: conda-forge, ccpi |
| 26 | + conda-remove-defaults: "true" |
| 27 | + |
| 28 | + - run: conda install boa conda-verify |
| 29 | + |
| 30 | + - name: conda build |
| 31 | + run: > |
| 32 | + conda mambabuild -c conda-forge -c ccpi --python=3.7 --output-folder dist recipe |
| 33 | +
|
| 34 | + - name: Upload conda package as artifact |
| 35 | + uses: actions/upload-artifact@v4 |
| 36 | + with: |
| 37 | + name: cilviewer |
| 38 | + path: dist |
| 39 | + |
| 40 | + conda-upload: |
| 41 | + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release' |
| 42 | + runs-on: ubuntu-latest |
| 43 | + needs: build |
| 44 | + defaults: {run: {shell: 'bash -el {0}', working-directory: dist}} |
| 45 | + steps: |
| 46 | + - uses: conda-incubator/setup-miniconda@v3 |
| 47 | + with: |
| 48 | + mamba-version: "*" |
| 49 | + channels: conda-forge |
| 50 | + |
| 51 | + - name: Download built conda package |
| 52 | + uses: actions/download-artifact@v4 |
| 53 | + with: |
| 54 | + name: cilviewer |
| 55 | + path: dist |
| 56 | + |
35 | 57 | - run: mamba install anaconda-client |
36 | | - - name: anaconda upload -c ccpi |
| 58 | + |
| 59 | + - name: Upload to ccpi anaconda channel |
37 | 60 | run: > |
38 | | - anaconda -v -t ${{ secrets.ANACONDA_TOKEN }} upload --force --label 'main' noarch/* |
| 61 | + anaconda -v -t ${{ secrets.ANACONDA_TOKEN }} upload --force --label 'main' dist/noarch/* |
0 commit comments