Skip to content

Merge pull request #672 from British-Oceanographic-Data-Centre/develop #109

Merge pull request #672 from British-Oceanographic-Data-Centre/develop

Merge pull request #672 from British-Oceanographic-Data-Centre/develop #109

name: Build and Deploy Python package
on:
push:
branches:
master
jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip virtualenv
python -m pip install -r requirements.txt
- name: Shell Script Permissions
run: |
chmod +x *.sh
- name: Setup Environment
run: |
./setup_environment.sh
- name: Build Package
run: |
./build.sh
- name: Test Package Install
run: |
python -m pip install dist/COAsT-*.tar.gz
- name: Publish Package to PyPi
shell: bash
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
./publish.sh "https://upload.pypi.org/legacy/" "$PYPI_TOKEN"
- name: Generate Conda Metadata
run: |
./generate_conda_meta.sh
cat conda/meta.yaml
- name: Publish Package to Anaconda
uses: fcakyon/[email protected]
with:
subdir: "conda"
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'win osx linux'