@@ -19,92 +19,57 @@ jobs:
1919 defaults :
2020 run :
2121 shell : bash -l {0}
22- env :
23- CHANS : " -c pyviz -c bokeh"
24- PKG_TEST_PYTHON : " --test-python=py37"
25- PYTHON_VERSION : " 3.7"
26- MPLBACKEND : " Agg"
27- CONDA_UPLOAD_TOKEN : ${{ secrets.CONDA_UPLOAD_TOKEN }}
2822 steps :
29- - uses : actions/checkout@v3
30- with :
31- fetch-depth : " 100"
32- - uses : actions/setup-python@v4
33- with :
34- python-version : ${{ matrix.python-version }}
23+ - uses : actions/checkout@v4
24+ - name : Fetch unshallow
25+ run : git fetch --prune --tags --unshallow -f
3526 - uses : conda-incubator/setup-miniconda@v2
3627 with :
3728 miniconda-version : " latest"
38- python-version : ${{ env.PYTHON_VERSION }}
39- - name : Fetch
40- run : git fetch --prune --tags -f
29+ python-version : " 3.11"
30+ auto-update-conda : true
4131 - name : Set output
4232 id : vars
4333 run : echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
4434 - name : conda setup
4535 run : |
46- conda config --set always_yes True
47- conda install -c pyviz "pyctdev>=0.5"
48- doit ecosystem_setup
36+ conda install anaconda-client conda-build setuptools_scm
4937 - name : conda build
50- run : doit package_build $CHANS $PKG_TEST_PYTHON --test-group=unit
38+ run : |
39+ VERSION=`python -m setuptools_scm` conda build conda.recipe/
5140 - name : conda dev upload
5241 if : (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
53- run : doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev
42+ run : |
43+ anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev $(VERSION=`python -m setuptools_scm` conda build --output conda.recipe)
5444 - name : conda main upload
5545 if : (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
56- run : doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main
46+ run : |
47+ anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev --label=main $(VERSION=`python -m setuptools_scm` conda build --output conda.recipe)
5748 pip_build :
5849 name : Build PyPI Packages
5950 runs-on : ' ubuntu-latest'
6051 defaults :
6152 run :
6253 shell : bash -l {0}
63- env :
64- CHANS : " -c pyviz -c bokeh"
65- PKG_TEST_PYTHON : " --test-python=py37"
66- PYTHON_VERSION : " 3.7"
67- MPLBACKEND : " Agg"
68- PPU : ${{ secrets.PPU }}
69- PPP : ${{ secrets.PPP }}
70- PYPI : " https://upload.pypi.org/legacy/"
7154 steps :
72- - uses : actions/checkout@v3
73- with :
74- fetch-depth : " 100"
75- - uses : actions/setup-python@v4
76- with :
77- python-version : ${{ matrix.python-version }}
78- - uses : conda-incubator/setup-miniconda@v2
55+ - uses : actions/checkout@v4
56+ - name : Fetch unshallow
57+ run : git fetch --prune --tags --unshallow -f
58+ - name : Set up Python
59+ uses : actions/setup-python@v5
7960 with :
80- miniconda-version : " latest"
81- python-version : ${{ env.PYTHON_VERSION }}
82- - name : Fetch
83- run : git fetch --prune --tags -f
84- - name : conda setup
85- run : |
86- conda config --set always_yes True
87- conda install -c pyviz "pyctdev>=0.5"
88- doit ecosystem_setup
89- doit env_create $CHANS --python=$PYTHON_VERSION
61+ python-version : " 3.11"
9062 - name : env setup
9163 run : |
92- eval "$(conda shell.bash hook)"
93- conda activate test-environment
94- doit develop_install $CHANS_DEV -o unit_tests
95- doit pip_on_conda
96- - name : doit env_capture
97- run : |
98- conda activate test-environment
99- doit env_capture
64+ python -m pip install --upgrade pip
65+ python -m pip install build
10066 - name : pip build
10167 run : |
102- eval "$(conda shell.bash hook)"
103- conda activate test-environment
104- doit ecosystem=pip package_build
105- - name : pip upload
68+ python -m build
69+ - name : Publish package to PyPI
10670 if : github.event_name == 'push'
107- run : |
108- eval "$(conda shell.bash hook)"
109- conda activate test-environment
110- doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI
71+ uses : pypa/gh-action-pypi-publish@release/v1
72+ with :
73+ user : ${{ secrets.PPU }}
74+ password : ${{ secrets.PPP }}
75+ packages-dir : dist/
0 commit comments