9
9
jobs :
10
10
conda-update :
11
11
runs-on : ubuntu-latest
12
- strategy :
13
- matrix :
14
- python-version :
15
- - " 3.7"
16
- - " 3.8"
17
- - " 3.9"
18
- - " 3.10"
19
- - " 3.11"
20
12
steps :
21
13
- uses : actions/checkout@v3
22
14
with :
23
15
fetch-depth : 0
24
16
25
17
- uses : actions/setup-python@v4
26
18
with :
27
- python-version : ${{ matrix.python-version }}
19
+ python-version : ' 3.11 '
28
20
29
21
- name : Install and Setup
30
22
run : |
55
47
run : |
56
48
git config --local user.email "github-actions[bot]@users.noreply.github.com"
57
49
git config --local user.name "github-actions[bot]"
58
- git commit -am"Bumped build to $(cat conda/build)')
50
+ git commit -am"Bumped build to $(cat conda/build)
59
51
60
52
Updated conda distribution at $(date). The following files have been changed:
61
53
${{ steps.verify-changed-files.outputs.changed_files }}"
@@ -83,12 +75,53 @@ jobs:
83
75
with :
84
76
tag : " conda-${{ steps.get_version.outputs.PCAPKIT_VERSION }}+${{ steps.get_version.outputs.PCAPKIT_BUILD }}"
85
77
78
+ outputs :
79
+ CONDA_CHANGED : ${{ steps.verify-changed-files.outputs.files_changed }}
80
+ PCAPKIT_VERSION : ${{ steps.get_version.outputs.PCAPKIT_VERSION }}
81
+ PCAPKIT_CONDA_LABEL : ${{ steps.get_version.outputs.PCAPKIT_CONDA_LABEL }}
82
+ PCAPKIT_BUILD : ${{ steps.get_version.outputs.PCAPKIT_BUILD }}
83
+
84
+ conda-dist :
85
+ runs-on : ubuntu-latest
86
+ needs : [ conda-update ]
87
+ if : needs.conda-update.outputs.CONDA_CHANGED == 'true'
88
+ strategy :
89
+ matrix :
90
+ python-version :
91
+ - " 3.7"
92
+ - " 3.8"
93
+ - " 3.9"
94
+ - " 3.10"
95
+ - " 3.11"
96
+ steps :
97
+ - uses : actions/checkout@v3
98
+ with :
99
+ fetch-depth : 0
100
+
101
+ - uses : actions/setup-python@v4
102
+ with :
103
+ python-version : ${{ matrix.python-version }}
104
+
105
+ - name : Install and Setup
106
+ run : |
107
+ set -x
108
+
109
+ python -m pip install -U pip setuptools wheel
110
+ python -m pip install -e .[all]
111
+ python -m pip install pathlib2 typing_extensions
112
+
113
+ - name : Setup Conda Distribution
114
+ run : |
115
+ export PCAPKIT_DEVMODE=1
116
+ export PCAPKIT_VERBOSE=1
117
+
118
+ python util/conda-dist.py
119
+
86
120
- name : Conda environment creation and activation
87
- if : steps.verify-changed-files.outputs.files_changed == 'true'
88
121
uses : conda-incubator/setup-miniconda@v2
89
122
env :
90
- PCAPKIT_VERSION : ${{ steps.get_version .outputs.PCAPKIT_VERSION }}
91
- PCAPKIT_BUILD : ${{ steps.get_version .outputs.PCAPKIT_BUILD }}
123
+ PCAPKIT_VERSION : ${{ needs.conda-update .outputs.PCAPKIT_VERSION }}
124
+ PCAPKIT_BUILD : ${{ needs.conda-update .outputs.PCAPKIT_BUILD }}
92
125
with :
93
126
python-version : ${{ matrix.python-version }}
94
127
environment-file : conda/conda-build.yaml # Path to the build conda environment
@@ -97,11 +130,10 @@ jobs:
97
130
show-channel-urls : true
98
131
99
132
- name : Build and upload the conda packages
100
- if : steps.verify-changed-files.outputs.files_changed == 'true'
101
133
uses : uibcdf/action-build-and-upload-conda-packages@v1.2.0
102
134
env :
103
- PCAPKIT_VERSION : ${{ steps.get_version .outputs.PCAPKIT_VERSION }}
104
- PCAPKIT_BUILD : ${{ steps.get_version .outputs.PCAPKIT_BUILD }}
135
+ PCAPKIT_VERSION : ${{ needs.conda-update .outputs.PCAPKIT_VERSION }}
136
+ PCAPKIT_BUILD : ${{ needs.conda-update .outputs.PCAPKIT_BUILD }}
105
137
with :
106
138
meta_yaml_dir : conda/pypcapkit
107
139
python-version : ${{ matrix.python-version }} # Values previously defined in `matrix`
@@ -111,11 +143,10 @@ jobs:
111
143
token : ${{ secrets.ANACONDA_TOKEN }} # Replace with the right name of your secret
112
144
113
145
- name : Upload package to GitHub Release
114
- if : steps.verify-changed-files.outputs.files_changed == 'true'
115
146
uses : ncipollo/release-action@v1.12.0
116
147
with :
117
148
allowUpdates : true
118
149
artifacts : |
119
150
/tmp/compilation-*/*.tar.bz2
120
- tag : " v${{ steps.get_version .outputs.PCAPKIT_VERSION }}"
151
+ tag : " v${{ needs.conda-update .outputs.PCAPKIT_VERSION }}"
121
152
token : " ${{ secrets.GITHUB_TOKEN }}"
0 commit comments