|
6 | 6 | workflow_dispatch:
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - check-for-new-release: |
10 |
| - runs-on: ubuntu-latest |
11 |
| - steps: |
12 |
| - - uses: actions/checkout@v3 |
13 |
| - |
14 |
| - - name: Check PyPI version |
15 |
| - uses: maybe-hello-world/pyproject-check-version@v3 |
16 |
| - id: versioncheck |
17 |
| - with: |
18 |
| - pyproject-path: "./pyproject.toml" |
19 |
| - |
20 |
| - - name: Report Results |
21 |
| - run: | |
22 |
| - echo "New Release found? ${{ steps.versioncheck.outputs.local_version_is_higher }}" |
23 |
| - echo "Local version: ${{ steps.versioncheck.outputs.local_version }}" |
24 |
| - echo "Public version: ${{ steps.versioncheck.outputs.public_version }}" |
25 |
| - outputs: |
26 |
| - do_publish: ${{ steps.versioncheck.outputs.local_version_is_higher }} |
27 |
| - |
28 | 9 | pypi:
|
29 | 10 | name: Build and publish Python 🐍 distributions 📦 to PyPI
|
30 | 11 | runs-on: ubuntu-latest
|
31 |
| - needs: check-for-new-release |
32 |
| - if: ${{ needs.check-for-new-release.outputs.do_publish == 'true' }} |
33 | 12 | steps:
|
34 | 13 | - uses: actions/checkout@master
|
35 | 14 | - name: Set up Python 3.10
|
|
56 | 35 | password: ${{ secrets.PYPI_API_TOKEN }}
|
57 | 36 | skip-existing: true
|
58 | 37 | verbose: true
|
59 |
| - conda: |
60 |
| - name: Build and publish Conda distrbutions |
61 |
| - needs: pypi # wait for pypi build to finish |
62 |
| - runs-on: ubuntu-latest |
63 |
| - defaults: |
64 |
| - run: |
65 |
| - shell: bash -el {0} # login bash for conda calls |
66 |
| - steps: |
67 |
| - - uses: actions/checkout@master |
68 |
| - - name: Set up Python 3.10 |
69 |
| - uses: actions/setup-python@v3 |
70 |
| - with: |
71 |
| - python-version: "3.10" |
72 |
| - - name: Setup miniconda |
73 |
| - uses: conda-incubator/setup-miniconda@v2 |
74 |
| - with: |
75 |
| - auto-activate-base: true |
76 |
| - activate-environment: "" |
77 |
| - - name: Install build dependencies |
78 |
| - run: | |
79 |
| - conda install conda-build anaconda-client |
80 |
| - conda install -c conda-forge grayskull |
81 |
| - conda config --set anaconda_upload yes |
82 |
| - - name: Build and Push astartes |
83 |
| - env: |
84 |
| - ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} |
85 |
| - run: | |
86 |
| - cd .. |
87 |
| - sleep 60s # wait for the PyPI package to be visible |
88 |
| - grayskull pypi astartes |
89 |
| - cd astartes |
90 |
| - conda build . |
91 | 38 |
|
0 commit comments