-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (40 loc) · 1.46 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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]
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
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 --version
pip install -e .
pip install twine
python setup.py sdist && twine upload --verbose --skip-existing dist/*