forked from koodo-reader/koodo-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 1.08 KB
/
upload.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
name: Download and Upload Release Files
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download release files
run: |
curl -s https://api.github.com/repos/koodo-reader/koodo-reader/releases/latest | \
jq -r ".assets[] | .browser_download_url" | \
xargs -L 1 curl -LO
- name: Install B2 CLI
run: |
curl https://f000.backblazeb2.com/file/backblazeb2-public/b2-linux-x86_64 -o b2
chmod +x b2
- name: Create or update folder in Backblaze
run: |
./b2 authorize-account ${{ secrets.B2_ACCOUNT_ID }} ${{ secrets.B2_APPLICATION_KEY }}
./b2 create-bucket ${{ secrets.B2_BUCKET_NAME }} ${{ github.ref }} allPublic
- name: Upload release files to Backblaze
run: |
./b2 authorize-account ${{ secrets.B2_ACCOUNT_ID }} ${{ secrets.B2_APPLICATION_KEY }}
./b2 sync --delete --excludeRegex ".*\.git.*" release_files/ ${{ secrets.B2_BUCKET_NAME }}/${{ github.ref }}