Skip to content

Aligning feature set with private release #18

Aligning feature set with private release

Aligning feature set with private release #18

Workflow file for this run

name: Push to PyPI
on:
release:
types: [published]
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/datago
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install linux deps
run: |
sudo apt-get update
sudo apt-get -y install libvips-dev libjpeg-turbo8-dev
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.18.1"
- run: go version
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11.10"
- name: Install pybindgen
run: |
python3 -m pip install pybindgen
go install golang.org/x/tools/cmd/[email protected]
go install github.com/go-python/gopy@latest
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: calver
increment: patch
- name: Build python module
run: |
cd pkg
GOAMD64=v3 gopy pkg -author="Photoroom" -email="[email protected]" -name="datago" -vm="python3" -version="${{ steps.version.outputs.major-version }}.${{ steps.version.outputs.minor-version }}.${{ steps.version.outputs.patch-version }}" .
export DESTINATION="../build"
mkdir -p $DESTINATION/datago
mv datago/* $DESTINATION/datago/.
mv setup.py $DESTINATION/.
mv Makefile $DESTINATION/.
mv README.md $DESTINATION/.
cat MANIFEST.in
mv MANIFEST.in $DESTINATION/.
rm LICENSE
ls
cd ../build
- name: Install python module
run: |
ls
cd build
python3 -m pip install --user -v -e .
- name: Run the python unit tests
env:
DATAROOM_API_KEY: ${{ secrets.DATAROOM_API_KEY }}
DATAROOM_TEST_SOURCE: ${{ secrets.DATAROOM_TEST_SOURCE }}
DATAROOM_API_URL: ${{ secrets.DATAROOM_API_URL }}
run: |
ls
python3 -m pip install -r requirements-tests.txt
pytest -xv python/*
- name: Build the package
run: |
cd build
python3 setup.py sdist
mv dist ../.
cd ..
ls
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1