-
Notifications
You must be signed in to change notification settings - Fork 27
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
1 parent
d47c473
commit e2d2419
Showing
3 changed files
with
48 additions
and
2,331 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 |
---|---|---|
|
@@ -3,35 +3,6 @@ name: CD | |
on: [push, pull_request] | ||
|
||
jobs: | ||
conda: | ||
name: build and deploy to conda | ||
if: github.repository == 'payu-org/payu' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
python-version: 3.11 | ||
environment-file: conda/environment.yml | ||
auto-update-conda: false | ||
auto-activate-base: false | ||
show-channel-urls: true | ||
|
||
- name: Build and upload the conda package | ||
uses: uibcdf/[email protected] | ||
with: | ||
meta_yaml_dir: conda | ||
python-version: 3.11 | ||
user: accessnri | ||
label: main | ||
token: ${{ secrets.anaconda_token }} | ||
|
||
pypi-build: | ||
name: Build package for PyPI | ||
if: github.repository == 'payu-org/payu' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
|
@@ -69,3 +40,33 @@ jobs: | |
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e | ||
with: | ||
packages_dir: artifact/ | ||
|
||
conda: | ||
name: build and deploy to conda | ||
needs: pypi-publish | ||
if: always() && needs.pypi-publish.result == 'success' | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniconda-version: "latest" | ||
python-version: 3.11 | ||
environment-file: conda/environment.yml | ||
auto-update-conda: false | ||
auto-activate-base: false | ||
show-channel-urls: true | ||
|
||
- name: Build and upload the conda package | ||
uses: uibcdf/[email protected] | ||
with: | ||
meta_yaml_dir: conda | ||
python-version: 3.11 | ||
user: accessnri | ||
label: main | ||
token: ${{ secrets.anaconda_token }} |
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
Oops, something went wrong.