-
Notifications
You must be signed in to change notification settings - Fork 13
executable file
·47 lines (42 loc) · 1.6 KB
/
build_conda.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Conda
on:
release:
types: ['released', 'prereleased']
# workflow_dispatch: # Un comment line if you also want to trigger action manually
jobs:
conda_deployment_with_new_tag:
name: Conda deployment of package for platform ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Conda environment creation and activation
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
environment-file: recipe/build-env.yml # Path to the build conda environment
activate-environment: build-environment
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true
- name: Build and upload the conda packages
uses: uibcdf/[email protected]
with:
meta_yaml_dir: recipe
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix`
user: phygbu
label: auto
overwrite: true
token: ${{ secrets.ANACONDA }} # Replace with the right name of your secret
- name: Upload wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install twine
python setup.py sdist bdist_wheel
twine upload dist/*