-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (50 loc) · 1.5 KB
/
pre-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
name: "Pre Release"
on:
push:
tags:
- "v*"
jobs:
pre-release:
name: "Pre Release"
runs-on: "ubuntu-latest"
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
# Build
- run: bash -x build.sh
# Draft Release
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: true
files: |
build/*.deb
# Upload QiNiu nightly
- name: "Upload to QiNiu"
env:
QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
QINIU_AK: ${{ secrets.QINIU_AK }}
QINIU_SK: ${{ secrets.QINIU_SK }}
run: |
sudo apt-get update
sudo apt-get install -y unzip
if [ $(uname -m) == 'x86_64' ]; then
wget http://devtools.qiniu.com/qshell-linux-x64-v2.4.1.zip
unzip qshell-linux-x64-v2.4.1.zip
mv qshell-linux-x64-v2.4.1 qshell
else
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.1.zip
unzip qshell-linux-x86-v2.4.1.zip
mv qshell-linux-x86-v2.4.1 qshell
fi
chmod +x qshell
./qshell account -w ${QINIU_AK} ${QINIU_SK} deploy-account
for f in $(find build -name '*.deb' ); do
filename=${f##*/}
key=nightly/${filename}
./qshell rput --overwrite ${QINIU_BUCKET} ${key} ${f}
done