Skip to content

Commit

Permalink
add action to publich conda package
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-foscato committed Dec 31, 2023
1 parent b7761ad commit c968d74
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/publish_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'Publish Conda Package'

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}

jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repo
uses: actions/checkout@master

- name: Get version identifier
id: get_version
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
echo ${GITHUB_REF#refs/tags/v}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: anaconda-client-env
environment-file: conda/environment.yml

- name: Build package and publish
run: |
conda config --set anaconda_upload yes
conda build -c conda-forge .
env:
AUTOCOMPCHEM_VERSION: ${{ steps.get_version.outputs.VERSION }}

0 comments on commit c968d74

Please sign in to comment.