mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
use b2 upload-file instead of b2 sync
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
name: Nightly
|
name: Nightly
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 20 * * *
|
- cron: 0 20 * * *
|
||||||
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_windows:
|
build_windows:
|
||||||
@@ -91,36 +93,40 @@ jobs:
|
|||||||
needs: [build_windows, build_macos, build_ubuntu]
|
needs: [build_windows, build_macos, build_ubuntu]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Install B2 CLI
|
- name: Install B2 CLI
|
||||||
shell: bash
|
shell: bash
|
||||||
run: sudo pip install --upgrade b2
|
run: sudo pip install --upgrade b2
|
||||||
|
|
||||||
- name: Download Windows artifacts
|
- name: Download Windows artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: windows_artifacts
|
name: windows_artifacts
|
||||||
|
|
||||||
- name: Download Ubuntu artifacts
|
- name: Download Ubuntu artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: ubuntu_artifacts
|
name: ubuntu_artifacts
|
||||||
|
|
||||||
- name: Download macOS artifacts
|
- name: Download macOS artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: macos_artifacts
|
name: macos_artifacts
|
||||||
- name: Create archieves
|
|
||||||
run: |
|
- name: Create archives and upload
|
||||||
now=$(date +'%Y-%m-%d')
|
|
||||||
7z a output/odin-windows-amd64-nightly+$now.zip -r windows_artifacts/
|
|
||||||
7z a output/odin-ubuntu-amd64-nightly+$now.zip -r ubuntu_artifacts/
|
|
||||||
7z a output/odin-macos-amd64-nightly+$now.zip -r macos_artifact/
|
|
||||||
- name: Upload artifacts to b2
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
APPID: ${{ secrets.B2_APPID }}
|
APPID: ${{ secrets.B2_APPID }}
|
||||||
APPKEY: ${{ secrets.B2_APPKEY }}
|
APPKEY: ${{ secrets.B2_APPKEY }}
|
||||||
|
BUCKET: ${{ secrets.B2_BUCKET }}
|
||||||
run: |
|
run: |
|
||||||
b2 authorize-account "$APPID" "$APPKEY"
|
b2 authorize-account "$APPID" "$APPKEY"
|
||||||
b2 sync --keepDays 7 output b2://odin-binaries/nightly
|
|
||||||
|
./ci/upload-create-nightly.sh "$BUCKET" windows-amd64 windows_artifacts/
|
||||||
|
./ci/upload-create-nightly.sh "$BUCKET" ubuntu-amd64 ubuntu_artifacts/
|
||||||
|
./ci/upload-create-nightly.sh "$BUCKET" macos-amd64 macos_artifact/
|
||||||
|
|
||||||
python3 ci/create_nightly_json.py > nightly.json
|
python3 ci/create_nightly_json.py > nightly.json
|
||||||
b2 upload-file odin-binaries nightly.json nightly.json
|
b2 upload-file "$BUCKET" nightly.json nightly.json
|
||||||
b2 clear-account
|
|
||||||
|
b2 clear-account
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
bucket=$1
|
||||||
|
platform=$2
|
||||||
|
artifact=$2
|
||||||
|
|
||||||
|
now=$(date +'%Y-%m-%d')
|
||||||
|
filename="odin-$platform-nightly+$now.zip"
|
||||||
|
|
||||||
|
7z a "output/$filename" -r "$artifact"
|
||||||
|
b2 upload-file "$bucket" "$filename" "$filename"
|
||||||
Reference in New Issue
Block a user