-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support build AB and A-only at the same time
- Loading branch information
1 parent
923582a
commit 223dd07
Showing
1 changed file
with
31 additions
and
11 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,7 +16,7 @@ on: | |
required: true | ||
default: 'miui' | ||
SGSI_TYPE: | ||
description: 'SGSI_TYPE(AB or A)' | ||
description: 'SGSI_TYPE(AB, A, or BOTH)' | ||
required: true | ||
default: 'AB' | ||
REPACK_NAME: | ||
|
@@ -78,7 +78,7 @@ jobs: | |
java -version | ||
- name: Make AB type GSI... | ||
if: ${{ github.event.inputs.SGSI_TYPE }} == 'AB' | ||
if: ${{ github.event.inputs.SGSI_TYPE }} == 'AB' || ${{ github.event.inputs.SGSI_TYPE }} == 'BOTH' | ||
run: | | ||
sudo bash $GITHUB_WORKSPACE/Tool-SGSI-build/make.sh AB << EOF | ||
${{ github.event.inputs.ZIP_NAME }} | ||
|
@@ -87,8 +87,27 @@ jobs: | |
${{ github.event.inputs.OS_TYPE }} | ||
y | ||
- name: Packing(AB)... | ||
if: ${{ github.event.inputs.SGSI_TYPE }} == 'AB' || ${{ github.event.inputs.SGSI_TYPE }} == 'BOTH' | ||
run: | | ||
cd $GITHUB_WORKSPACE/Tool-SGSI-build | ||
pwd | ||
zip -r AB_${{ github.event.inputs.REPACK_NAME }} SGSI/* | ||
ls "AB_${{ github.event.inputs.REPACK_NAME }}" | ||
echo "--------------------------------------" | ||
ls | ||
echo "--------------------------------------" | ||
mkdir upload_ab | ||
echo "--------------------------------------" | ||
ls upload_ab | ||
echo "--------------------------------------" | ||
if [ $(ls -l AB_${{ github.event.inputs.REPACK_NAME }} | awk '{print $5}') -gt 2147483647 ]; then tar cvzpf - AB_${{ github.event.inputs.REPACK_NAME }} | split -d -b 1024m - upload_ab/AB_${{ github.event.inputs.REPACK_NAME }}; else mv AB_${{ github.event.inputs.REPACK_NAME }} upload_ab/AB_${{ github.event.inputs.REPACK_NAME }}; fi | ||
echo "--------------------------------------" | ||
ls upload_ab | ||
echo "--------------------------------------" | ||
- name: Make A-only type GSI... | ||
if: ${{ github.event.inputs.SGSI_TYPE }} == 'A' | ||
if: ${{ github.event.inputs.SGSI_TYPE }} == 'A' || ${{ github.event.inputs.SGSI_TYPE }} == 'BOTH' | ||
run: | | ||
sudo bash $GITHUB_WORKSPACE/Tool-SGSI-build/make.sh A << EOF | ||
${{ github.event.inputs.ZIP_NAME }} | ||
|
@@ -97,28 +116,29 @@ jobs: | |
${{ github.event.inputs.OS_TYPE }} | ||
y | ||
- name: Packing... | ||
- name: Packing(A-only)... | ||
if: ${{ github.event.inputs.SGSI_TYPE }} == 'A' || ${{ github.event.inputs.SGSI_TYPE }} == 'BOTH' | ||
run: | | ||
cd $GITHUB_WORKSPACE/Tool-SGSI-build | ||
pwd | ||
zip -r ${{ github.event.inputs.REPACK_NAME }} SGSI/* | ||
ls "${{ github.event.inputs.REPACK_NAME }}" | ||
zip -r AONLY_${{ github.event.inputs.REPACK_NAME }} SGSI/* | ||
ls "AONLY_${{ github.event.inputs.REPACK_NAME }}" | ||
echo "--------------------------------------" | ||
ls | ||
echo "--------------------------------------" | ||
mkdir upload | ||
mkdir upload_aonly | ||
echo "--------------------------------------" | ||
ls upload | ||
ls upload_aonly | ||
echo "--------------------------------------" | ||
if [ $(ls -l ${{ github.event.inputs.REPACK_NAME }} | awk '{print $5}') -gt 2147483647 ]; then tar cvzpf - ${{ github.event.inputs.REPACK_NAME }} | split -d -b 1024m - upload/${{ github.event.inputs.REPACK_NAME }}; else mv ${{ github.event.inputs.REPACK_NAME }} upload/${{ github.event.inputs.REPACK_NAME }}; fi | ||
if [ $(ls -l AONLY_${{ github.event.inputs.REPACK_NAME }} | awk '{print $5}') -gt 2147483647 ]; then tar cvzpf - AONLY_${{ github.event.inputs.REPACK_NAME }} | split -d -b 1024m - upload_aonly/AONLY_${{ github.event.inputs.REPACK_NAME }}; else mv AONLY_${{ github.event.inputs.REPACK_NAME }} upload_aonly/AONLY_${{ github.event.inputs.REPACK_NAME }}; fi | ||
echo "--------------------------------------" | ||
ls upload | ||
ls upload_aonly | ||
echo "--------------------------------------" | ||
- name: Upload to Release... | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: "${{ github.workspace }}/Tool-SGSI-build/upload/*" | ||
artifacts: "${{ github.workspace }}/Tool-SGSI-build/upload_ab/*,${{ github.workspace }}/Tool-SGSI-build/upload_aonly/*" | ||
tag: "${{ github.event.inputs.REPACK_NAME }}_${{ env.BUILD_TIME }}" | ||
bodyFile: "${{ github.workspace }}/Tool-SGSI-build/SGSI/build_info.txt" | ||
token: ${{ secrets.GITHUB_TOKEN }} |