Skip to content

Commit

Permalink
Rework conda build (#20)
Browse files Browse the repository at this point in the history
* Running conda publish with release pipeline
  • Loading branch information
hansenms authored Aug 16, 2022
1 parent ca55aba commit bd5859b
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 37 deletions.
28 changes: 28 additions & 0 deletions .github/actions/conda/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Conda'
description: 'Builds and (optionally) publishes conda package'
inputs:
ANACONDA_TOKEN:
description: 'Token for pushing to anaconda.org'
required: true
runs:
using: "composite"
steps:
- uses: conda-incubator/setup-miniconda@e81abac10ce2c37423b54eae5af93aa3b4d3475c
with:
activate-environment: mrd-storage-server-build
environment-file: conda/environment.yml
python-version: 3.9
auto-activate-base: false
- name: Build conda package
shell: bash -l {0}
working-directory: conda
run: |
export GIT_DESCRIBE_TAG="${GITHUB_REF##*/}"
./package.sh
echo "Packages built: $(find build_pkg -name mrd-storage-server*.tar.bz2)"
- name: Push conda package
shell: bash -l {0}
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
working-directory: conda
run: |
./publish_package.sh -u ismrmrd -t ${{ inputs.ANACONDA_TOKEN }} -p `find build_pkg -name mrd-storage-server*.tar.bz2`
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,19 @@ jobs:
### Changelog
{commits}
conda-build:
needs: publish
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Conda
uses: ./.github/actions/conda
with:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}


37 changes: 0 additions & 37 deletions .github/workflows/mrd_storage_server_conda.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ jobs:

- name: Validate
uses: ./.github/actions/validate

conda-build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Conda
uses: ./.github/actions/conda
with:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}

0 comments on commit bd5859b

Please sign in to comment.