release-python #174
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
# see https://github.com/peter-evans/repository-dispatch | |
# - name: Dispatch Payload | |
# run: echo ${{ github.event.client_payload }} | |
- name: Upload to PyPi | |
run: | | |
mkdir sling/bin | |
cd sling/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 | |
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 | |
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 | |
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.exe | |
rm -f *.tar.gz | |
cd - | |
chmod -R 755 sling/bin | |
sling/bin/sling-linux-amd64 --version | |
pip install -e . | |
pip install twine | |
python setup.py sdist && twine upload --verbose --skip-existing dist/* |