-
Notifications
You must be signed in to change notification settings - Fork 15
98 lines (89 loc) · 2.82 KB
/
master.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
name: Master
on:
push:
branches: [master]
jobs:
cancel-previous:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build-web:
uses: ./.github/workflows/build-web.yml
download-musl-cc:
uses: ./.github/workflows/download-musl-cc.yml
build-musl:
needs:
- build-web
- download-musl-cc
uses: ./.github/workflows/build-musl.yml
build-gnu:
needs:
- build-web
- download-musl-cc
uses: ./.github/workflows/build-gnu.yml
build-other:
needs:
- build-musl
- build-gnu
uses: ./.github/workflows/build-other.yml
dev-release:
runs-on: ubuntu-latest
needs:
- build-other
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v2
- name: Fix cargo config
run: sed -e "s/.*replace-with.*//g" -i .cargo/config.toml
- name: Download all
uses: actions/download-artifact@v3
with:
name: pisugar-all
# Development Release
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Development Build"
prerelease: true
draft: false
files: |
target/**/*.deb
target/**/*.rpm
scripts/*.sh
scripts/aur/*.tar.gz
!scripts/update-version.sh
# 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 https://github.com/qiniu/qshell/releases/download/v2.9.0/qshell-v2.9.0-linux-amd64.tar.gz
tar -xvf qshell-v2.9.0-linux-amd64.tar.gz
else
wget https://github.com/qiniu/qshell/releases/download/v2.9.0/qshell-v2.9.0-linux-386.tar.gz
tar -xvf qshell-v2.9.0-linux-386.tar.gz
fi
chmod +x qshell
./qshell account -w ${QINIU_AK} ${QINIU_SK} deploy-account
for f in $(find target -type f -name '*.deb') $(find target -type f -name '*.rpm') $(find scripts -name '*.tar.gz'); do
filename=${f##*/}
key=nightly/${filename}
./qshell rput --overwrite ${QINIU_BUCKET} ${key} ${f}
done
for f in $(find scripts -name '*.sh' ); do
filename=${f##*/}
key=nightly/${filename}
./qshell rput --overwrite --mimetype text/plain ${QINIU_BUCKET} ${key} ${f} &
done
wait
echo "All uploaded to qiniu"