-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.05 KB
/
release.yml
File metadata and controls
77 lines (65 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
workflow_dispatch:
inputs:
version:
required: true
default: 'x.y.z'
permissions:
contents: write
pull-requests: write
jobs:
release:
name: make github release
runs-on: ubuntu-24.04
steps:
- name: create release
uses: softprops/action-gh-release@v3
with:
name: v${{ github.event.inputs.version }}
generate_release_notes: true
tag_name: ${{ github.event.inputs.version }}
conda:
name: publish conda to anaconda.org
needs: release
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Update modeller key
shell: bash -l {0}
run: |
sed -i -e 's/SECRET-MODELLER-LICENSE-KEY/${{ secrets.MODELLER_KEY }}/g' $GITHUB_WORKSPACE/conda-recipe/meta.yml
sed -i -e 's/SECRET-MODELLER-LICENSE-KEY/${{ secrets.MODELLER_KEY }}/g' $GITHUB_WORKSPACE/conda-recipe/build.sh
- name: Setup Conda (conda-forge only)
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
python-version: "3.13.2"
auto-activate: false
conda-remove-defaults: true
channels: conda-forge,salilab
channel-priority: strict
- name: Install build tools
shell: bash -l {0}
run: |
conda install -y conda-build anaconda-client
conda config --set anaconda_upload no
- name: Build package
shell: bash -l {0}
env:
PIP_NO_INDEX: "0"
run: |
PKG_PATH=$(conda build conda-recipe --output)
echo "PKG_PATH=$PKG_PATH" >> "$GITHUB_ENV"
conda build conda-recipe
test -f "$PKG_PATH"
echo "Built: $PKG_PATH"
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
anaconda -t "$ANACONDA_API_TOKEN" upload "$PKG_PATH" --user CCPBioSim --force