Skip to content

Release to PyPi

Release to PyPi #261

Workflow file for this run

name: Release to PyPi
on:
workflow_dispatch:
inputs:
version:
description: 'version override'
required: false
repository_dispatch:
types: [release-python]
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
VERSION_OVERRIDE: ${{ github.event.inputs.version }}
jobs:
test-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install build twine pytest pyarrow
- name: Set version
run: |
# Get version from latest release or use override
if [[ $VERSION_OVERRIDE ]]; then
echo $VERSION_OVERRIDE > sling/VERSION
else
# Get latest version from GitHub releases
LATEST_VERSION=$(curl -s https://api.github.com/repos/slingdata-io/sling-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed 's/^v//')
echo $LATEST_VERSION > sling/VERSION
fi
echo "Version set to: $(cat sling/VERSION)"
- name: Run tests
run: |
cd sling
# Install sling package in development mode
pip install -e .
# Run the tests
python -m pytest tests/tests.py -v
SLING_USE_ARROW=false python -m pytest tests/test_sling_class.py -v
SLING_USE_ARROW=true python -m pytest tests/test_sling_class.py -v
- name: Build and release sling to PyPi
run: |
cp README.md sling/
cd sling
python -m build && twine upload --verbose --skip-existing dist/*
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy