Updated CD, to build and upload to Anaconda packages for any platform… #8
Workflow file for this run
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
name: CD | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
get-package-name: | |
name: Get package name | |
runs-on: ubuntu-latest | |
outputs: | |
package-name: ${{ steps.get-package-name.outputs.package-name }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
- name: Get name | |
id: get-package-name | |
run: | | |
echo "package-name=$(yq '.project.name' pyproject.toml)" >> $GITHUB_OUTPUT | |
release-conda-package: | |
name: Build with conda and upload | |
runs-on: ubuntu-latest | |
needs: get-package-name | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
fetch-depth: 0 | |
- name: Setup conda environment | |
uses: conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a | |
with: | |
miniconda-version: "latest" | |
python-version: ${{ vars.PY_VERSION }} | |
environment-file: .conda/env_build.yml | |
auto-update-conda: false | |
auto-activate-base: false | |
show-channel-urls: true | |
- name: Build and upload conda package | |
id: build-and-upload | |
uses: uibcdf/action-build-and-upload-conda-packages@b06165145a25b9c8bcb2d2b24682ad0d8e494ce7 #v1.4.0 | |
with: | |
meta_yaml_dir: .conda | |
python-version: ${{ vars.PY_VERSION }} | |
user: ${{ secrets.ANACONDA_USER_NAME }} | |
token: ${{ secrets.ANACONDA_TOKEN }} | |
platform_all: true | |
- name: Create Release | |
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 #v2.0.8 | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{needs.get-package-name.outputs.package-name}} ${{ github.ref_name }} | |
generate_release_notes: true | |
fail_on_unmatched_files: true | |
files: ${{steps.build-and-upload.outputs.paths}} |