-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
82 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,14 @@ on: | |
# workflow_dispatch: | ||
|
||
jobs: | ||
build-src: | ||
build-app: | ||
name: Build Base Packages | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
ARCH: ['x64', 'arm64', 'loong64', 'loongarch64'] | ||
ARCH: ['x64'] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
|
@@ -57,21 +57,25 @@ jobs: | |
BUILD_ARCH: ${{ matrix.ARCH }} | ||
run: | | ||
ls -l | ||
tools/setup-bilibili | ||
tools/update-bilibili | ||
tools/fix-other.sh | ||
tools/area-unlimit.sh | ||
mv tmp/bili/resources/* app | ||
- name: Compress Resources | ||
run: | | ||
ls -l | ||
mkdir -p tmp/src | ||
mkdir -p tmp/build | ||
tar -zcf tmp/src/bilibili-${{ steps.tag.outputs.tag }}-${{ matrix.ARCH }}.tar.gz bin app electron | ||
tar -zcf tmp/src/bilibili-${{ steps.tag.outputs.tag }}-${{ matrix.ARCH }}.tar.gz bin app # electron | ||
cp tmp/src/bilibili-${{ steps.tag.outputs.tag }}-${{ matrix.ARCH }}.tar.gz tmp/build/bilibili-${{ steps.tag.outputs.tag }}-app.tar.gz | ||
tar -zcf tmp/build/extensions-${{ steps.tag.outputs.tag }}.tar.gz extensions | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: bilibili-${{ matrix.ARCH }}.src | ||
name: bilibili-app.src | ||
path: tmp/src | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
|
@@ -81,7 +85,71 @@ jobs: | |
path: tmp/build | ||
|
||
build-linux: | ||
name: Build Linux | ||
name: Build Linux Packages | ||
needs: | ||
- build-app | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
ARCH: ['x64', 'arm64', 'loong64', 'loongarch64'] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: bilibili-app.build | ||
path: tmp/src | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
|
||
- name: Prepare | ||
run: | | ||
sudo apt install wget exiftool | ||
sudo npm install asar -g | ||
echo "$UID, $GID" | ||
- name: Generate TAG | ||
id: Tag | ||
run: | | ||
tag='continuous' | ||
name='Continuous Build' | ||
if [ 'true' == ${{ startsWith(github.ref, 'refs/tags/') }} ];then | ||
tag='${{ github.ref_name }}' | ||
name='${{ github.ref_name }}' | ||
fi | ||
echo "tag result: $tag - $name" | ||
echo "::set-output name=tag::$tag" | ||
echo "::set-output name=name::$name" | ||
- name: Build | ||
env: | ||
BUILD_ARCH: ${{ matrix.ARCH }} | ||
run: | | ||
ls -l | ||
tools/update-electron | ||
- name: Compress Resources | ||
run: | | ||
ls -l | ||
mkdir -p tmp/src | ||
mkdir -p tmp/build | ||
tar -zcf tmp/build/bilibili-${{ steps.tag.outputs.tag }}-${{ matrix.ARCH }}.tar.gz bin app electron | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: bilibili-${{ matrix.ARCH }}.build | ||
path: tmp/build | ||
|
||
build-appimage: | ||
name: Build AppImage | ||
needs: | ||
- build-src | ||
runs-on: ubuntu-latest | ||
|
@@ -96,6 +164,9 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: bilibili-app.build | ||
path: tmp/src | ||
|
||
- name: Prepare | ||
run: | | ||
|
@@ -152,6 +223,9 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: bilibili-app.build | ||
path: tmp/src | ||
|
||
- name: Prepare | ||
run: | | ||
|
@@ -232,7 +306,7 @@ jobs: | |
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: bilibili-${{ matrix.ARCH }}.build | ||
name: bilibili-app.build | ||
path: tmp/src | ||
|
||
- name: Prepare | ||
|
@@ -397,8 +471,8 @@ jobs: | |
upload: | ||
name: Create release and upload artifacts | ||
needs: | ||
- build-src | ||
- build-linux | ||
- build-appimage | ||
- build-win | ||
- build-deepin | ||
runs-on: ubuntu-latest | ||
|