Fix indentation #11
Workflow file for this run
This file contains hidden or 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: | |
| pypi: | |
| name: build and deploy to PyPI | |
| if: github.repository == 'ACCESS-NRI/yamanifest' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| runs-on: "ubuntu-latest" | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/[email protected] | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Install build dependencies | |
| run: python -m pip install build twine | |
| - name: Build distributions | |
| shell: bash -l {0} | |
| run: | | |
| git clean -xdf | |
| pyproject-build | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc | |
| conda: | |
| name: Build with conda and upload | |
| runs-on: ubuntu-latest | |
| 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: Enforce .tar.bz2 packages | |
| # Temporary work-arounds while the action uibcdf/action-build-and-upload-conda-packages gets updated: | |
| # We create a `~/.condarc` file with the correct options to enforce the use of `.tar.bz2` packages | |
| # and we set the channels to be used by conda build | |
| shell: bash | |
| run: | | |
| cat > ~/.condarc << EOF | |
| conda-build: | |
| pkg_format: .tar.bz2 | |
| channels: | |
| - accessnri | |
| - conda-forge | |
| - nodefaults | |
| EOF | |
| - name: Build and upload the conda package | |
| uses: uibcdf/action-build-and-upload-conda-packages@c6e7a90ad5e599d6cde76e130db4ee52ad733ecf | |
| with: | |
| meta_yaml_dir: .conda | |
| python-version: ${{ vars.PY_VERSION }} | |
| user: accessnri | |
| label: main | |
| token: ${{ secrets.ANACONDA_TOKEN }} |