-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish Releases | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ${{ matrix.os }} | ||
name: Publish | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 # use the latest code commit | ||
|
||
- name: Setup conda with python ${{ matrix.python-version }} | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Initialize powershell for conda (Windows only) | ||
if: runner.os == 'Windows' | ||
run: conda init powershell | ||
|
||
- name: Install dependencies with conda | ||
run: | | ||
conda install anaconda-client conda-build setuptools setuptools_scm | ||
- name: Build & upload with conda | ||
run: | | ||
# Login to anaconda (answer the resulting prompt with yes) | ||
echo y | anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }} --hostname "GitHub_${{ matrix.os }}_${{ matrix.python-version }}" | ||
# Enable automatic upload to anaconda.org | ||
conda config --set anaconda_upload yes | ||
# Run build process | ||
conda build conda.recipe -c conda-forge |