Skip to content

Release to PyPi

Release to PyPi #177

Workflow file for this run

name: Release to PyPi
on:
workflow_dispatch:
repository_dispatch:
types: [release-python]
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
jobs:
release-python:
# runs-on: [self-hosted, Linux]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Pip Install
run: |
pip install twine
- name: Release sling-linux-amd64 to PyPi
run: |
mkdir -p sling_base/sling-linux-amd64/sling_linux_amd64/bin
cd sling_base/sling-linux-amd64/sling_linux_amd64/bin
wget -q 'https://github.com/slingdata-io/sling-cli/releases/latest/download/sling_linux_amd64.tar.gz'
tar xf sling_linux_amd64.tar.gz
mv sling sling-linux-amd64
rm -f *.tar.gz
cd -
chmod -R 755 sling_base/sling-linux-amd64/sling_linux_amd64/bin
export SLING_VERSION=$( sling_base/sling-linux-amd64/sling_linux_amd64/bin/sling-linux-amd64 --version | sed 's/Version: //')
cd sling_base/sling-linux-amd64/sling_linux_amd64
pip install -e .
python setup.py sdist && twine upload --verbose --skip-existing dist/*
- name: Release sling-linux-arm64 to PyPi
run: |
mkdir -p sling_base/sling-linux-arm64/sling_linux_arm64/bin
cd sling_base/sling-linux-arm64/sling_linux_arm64/bin
wget -q 'https://github.com/slingdata-io/sling-cli/releases/latest/download/sling_linux_arm64.tar.gz'
tar xf sling_linux_arm64.tar.gz
mv sling sling-linux-arm64
rm -f *.tar.gz
cd -
chmod -R 755 sling_base/sling-linux-arm64/sling_linux_arm64/bin
export SLING_VERSION=$( sling_base/sling-linux-amd64/sling_linux_amd64/bin/sling-linux-amd64 --version | sed 's/Version: //')
cd sling_base/sling-linux-arm64/sling_linux_arm64
pip install -e .
python setup.py sdist && twine upload --verbose --skip-existing dist/*
- name: Release sling-mac-universal to PyPi
run: |
mkdir -p sling_base/sling-mac-universal/sling_mac_universal/bin
cd sling_base/sling-mac-universal/sling_mac_universal/bin
wget -q 'https://github.com/slingdata-io/sling-cli/releases/latest/download/sling_darwin_all.tar.gz'
tar xf sling_darwin_all.tar.gz
mv sling sling-mac
rm -f *.tar.gz
cd -
chmod -R 755 sling_base/sling-mac-universal/sling_mac_universal/bin
export SLING_VERSION=$( sling_base/sling-linux-amd64/sling_linux_amd64/bin/sling-linux-amd64 --version | sed 's/Version: //')
cd sling_base/sling-mac-universal/sling_mac_universal
pip install -e .
python setup.py sdist && twine upload --verbose --skip-existing dist/*
- name: Release sling-windows-amd64 to PyPi
run: |
mkdir -p sling_base/sling-windows-amd64/sling_windows_amd64/bin
cd sling_base/sling-windows-amd64/sling_windows_amd64/bin
wget -q 'https://github.com/slingdata-io/sling-cli/releases/latest/download/sling_windows_amd64.tar.gz'
tar xf sling_windows_amd64.tar.gz
mv sling.exe sling-win-amd64.exe
rm -f *.tar.gz
cd -
chmod -R 755 sling_base/sling-windows-amd64/sling_windows_amd64/bin
export SLING_VERSION=$( sling_base/sling-linux-amd64/sling_linux_amd64/bin/sling-linux-amd64 --version | sed 's/Version: //')
cd sling_base/sling-windows-amd64/sling_windows_amd64
pip install -e .
python setup.py sdist && twine upload --verbose --skip-existing dist/*
- name: Release sling to PyPi
run: |
cd sling
pip install -e .
python setup.py sdist && twine upload --verbose --skip-existing dist/*