Skip to content

Commit a36abfd

Browse files
felix5572felix5572njzjz
authored
add conda publish github action (#488)
* update conda release CI * fix publish conda workflow * add conda publish github action; it will release dpgen to conda deepmodeling channel when a new tag is added automatically * update conda build actions * upload conda .sh installer to github when new tag is add * update conda build CICD * use local source code in conda build CICD Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: felix5572 <felix5572@github.com> Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
1 parent 94fdf09 commit a36abfd

File tree

4 files changed

+109
-0
lines changed

4 files changed

+109
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: release_conda_and_github
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish-conda:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: publish-to-conda
14+
uses: felix5572/conda-publish-action@v1.9
15+
with:
16+
subdir: 'conda'
17+
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
18+
platforms: 'noarch'
19+
construct-and-publish:
20+
runs-on: ubuntu-latest
21+
needs: conda-publish
22+
steps:
23+
- uses: actions/checkout@master
24+
- uses: s-weigand/setup-conda@v1
25+
- run: conda install constructor jinja2 -y
26+
- run: constructor ./conda
27+
- name: Upload to release
28+
uses: softprops/action-gh-release@master
29+
if: startsWith(github.ref, 'refs/tags/')
30+
with:
31+
files: dpgen-*.sh
32+
repository: ${{ env.GITHUB_REPOSITORY }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

conda/conda_build_config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
channel_sources:
2+
- defaults
3+
- conda-forge
4+
channel_targets:
5+
- deepmodeling

conda/construct.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% set version = os.popen('git describe --tags --abbrev=0').read().strip('\n').lstrip('v').replace('-', '_') %}
2+
3+
name: dpgen
4+
version: {{ version }}
5+
6+
channels:
7+
- defaults
8+
- conda-forge
9+
- deepmodeling
10+
11+
specs:
12+
- python 3.8
13+
- pip
14+
- dpgen {{ version }}
15+
16+
ignore_duplicate_files: True
17+
18+
license_file: ../LICENSE

conda/meta.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{% set name = "dpgen" %}
2+
{% set version = os.popen('git describe --tags --abbrev=0').read().strip('\n').lstrip('v').replace('-', '_') %}
3+
4+
package:
5+
name: {{ name|lower }}
6+
version: {{ version }}
7+
8+
source:
9+
path: ..
10+
11+
build:
12+
number: 0
13+
noarch: python
14+
script: python -m pip install --no-deps --ignore-installed .
15+
16+
requirements:
17+
build:
18+
- git
19+
host:
20+
- python >=3.6
21+
- pip
22+
- setuptools_scm
23+
- dargs
24+
- paramiko
25+
- requests
26+
- dpdata
27+
- dpdispatcher
28+
29+
run:
30+
- python >=3.6
31+
- dargs
32+
- paramiko
33+
- requests
34+
- dpdata
35+
- dpdispatcher
36+
- pymatgen
37+
38+
test:
39+
imports:
40+
- dpgen
41+
42+
about:
43+
home: https://github.com/deepmodeling/dpgen
44+
license: LGPL-3.0
45+
license_family: LGPL
46+
license_file: LICENSE
47+
doc_url: https://github.com/deepmodeling/dpgen
48+
dev_url: https://github.com/deepmodeling/dpgen
49+
50+
extra:
51+
recipe-maintainers:
52+
- felix5572

0 commit comments

Comments
 (0)