-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.24 KB
/
version_sync.yml
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
name: Check that pip/pypi and conda versions are in sync
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
package-name: ['hipscat', 'hipscat-import', 'lsdb']
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Set up pip/dependencies
run: |
python -m pip install --upgrade pip
pip install get_pypi_latest_version
- name: Get conda version
run: echo "conda_version=$(conda search -c conda-forge ${{matrix.package-name}} | tail -n1 | awk '{print $2}')" >> $GITHUB_ENV
- name: Get pip version
run: echo "pypi_version=$(get_pypi_latest_version ${{matrix.package-name}})" >> $GITHUB_ENV
- name: Echo Versions
run: |
echo conda version=$conda_version
echo pypi version=$pypi_version
- name: Fail if versions do not match
if: ${{ env.conda_version != env.pypi_version }}
run: exit 1