-
Notifications
You must be signed in to change notification settings - Fork 8
118 lines (82 loc) · 3.96 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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/*