@@ -12,10 +12,18 @@ jobs:
1212 runs-on : ${{ matrix.os }}
1313 strategy :
1414 matrix :
15- os : [windows-2019, macos-10.15, ubuntu-18.04]
15+ os :
16+ - windows-2019
17+ - macos-10.15
18+ - ubuntu-18.04
1619 steps :
1720 - uses : actions/checkout@v2
1821
22+ - name : Install node
23+ uses : actions/setup-node@v2
24+ with :
25+ node-version : ' 12'
26+
1927 - name : Setup Python for Ubuntu
2028 run : |
2129 sudo apt-get install -y \
@@ -24,25 +32,20 @@ jobs:
2432 python3-distutils python3-setuptools python3-wheel python3-stdeb
2533 if : startsWith(matrix.os, 'ubuntu')
2634
27- - name : Setup Python for not Ubuntu
28- uses : actions/setup-python@v2
29- with :
30- python-version : 3.6
31- if : startsWith(matrix.os, 'ubuntu') == false
32-
33- - name : Install node
34- uses : actions/setup-node@v2
35- with :
36- node-version : ' 12'
37-
38- - name : Build binary for ubuntu
35+ - name : Build binary for Ubuntu
3936 run : |
4037 python3 -m venv env
4138 source env/bin/activate
4239 make build-quick
4340 if : startsWith(matrix.os, 'ubuntu')
4441
45- - name : Build binary for not ubuntu
42+ - name : Setup Python for not Ubuntu
43+ uses : actions/setup-python@v2
44+ with :
45+ python-version : 3.6
46+ if : startsWith(matrix.os, 'ubuntu') == false
47+
48+ - name : Build binary for not Ubuntu
4649 run : make build-quick
4750 if : startsWith(matrix.os, 'ubuntu') == false
4851
5255 path : |
5356 dist/*.pkg
5457 dist/*.exe
55- dist/* .bash
58+ dist/install_linux .bash
5659 dist/*.deb
5760 if-no-files-found : error
61+ retention-days : 1
62+
63+ deploy :
64+ runs-on : ubuntu-latest
65+ needs : build
66+
67+ steps :
68+ - uses : actions/checkout@v2
69+
70+ - name : Configure AWS credentials
71+ uses : aws-actions/configure-aws-credentials@v1
72+ with :
73+ aws-access-key-id : ${{ secrets.AWS_S3_FS_ACCESS_KEY_ID }}
74+ aws-secret-access-key : ${{ secrets.AWS_S3_FS_SECRET_ACCESS_KEY }}
75+ aws-region : eu-west-1
76+
77+ - name : Download artifacts
78+ uses : actions/download-artifact@v2
79+ with :
80+ path : ./dist
81+
82+ - name : Set version
83+ run : |
84+ echo "VERSION=v$(jq --raw-output .version < package.json)" >> $GITHUB_ENV
85+ echo "S3_CP=aws s3 cp --acl public-read" >> $GITHUB_ENV
86+ echo "S3_SYNC=aws s3 sync --acl public-read" >> $GITHUB_ENV
87+
88+ - name : Upload fs to S3
89+ run : |
90+ $S3_CP dist/ubuntu*/install_linux.bash s3://codegradefs/$VERSION/install_linux.bash
91+ $S3_CP dist/ubuntu*/python3-fusepy*.deb s3://codegradefs/$VERSION/linux/python3-fusepy.deb
92+ $S3_CP dist/ubuntu*/python3-codegrade-fs*_all.deb s3://codegradefs/$VERSION/linux/python3-codegrade-fs_all.deb
93+ $S3_CP dist/ubuntu*/codegrade-fs*_amd64.deb s3://codegradefs/$VERSION/linux/codegrade-fs_amd64.deb
94+ $S3_CP dist/ubuntu*/codegrade-fs*_i386.deb s3://codegradefs/$VERSION/linux/codegrade-fs_i386.deb
95+
96+ $S3_CP dist/windows*/*.exe s3://codegradefs/$VERSION/codegrade_filesystem_installer.exe
97+ $S3_CP dist/mac*/*.pkg s3://codegradefs/$VERSION/codegrade_filesystem_installer.pkg
0 commit comments