Skip to content

Commit 52b0d83

Browse files
committed
workflow add dryrun
1 parent 5749866 commit 52b0d83

File tree

3 files changed

+44
-17
lines changed

3 files changed

+44
-17
lines changed

.github/workflows/all.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ on:
2424
- ios
2525
- tvos
2626
- macos
27+
dryrun:
28+
description: 'just run workflow,but not deploy'
29+
required: false
30+
type: choice
31+
default: 'false'
32+
options:
33+
- true
34+
- false
2735
pull_request:
2836
branches: [master]
2937

@@ -48,13 +56,13 @@ jobs:
4856
run: |
4957
echo '------compile unibreak------------------------------------'
5058
rm -rf build || git reset --hard || git pull origin
51-
.github/workflows/onestep.sh unibreak ${{ inputs.platform }}
59+
.github/workflows/onestep.sh unibreak ${{ inputs.platform }} ${{ inputs.dryrun }}
5260
echo '------compile fribidi------------------------------------'
5361
rm -rf build || git reset --hard || git pull origin
54-
.github/workflows/onestep.sh fribidi ${{ inputs.platform }}
62+
.github/workflows/onestep.sh fribidi ${{ inputs.platform }} ${{ inputs.dryrun }}
5563
echo '------compile freetype------------------------------------'
5664
rm -rf build || git reset --hard || git pull origin
57-
.github/workflows/onestep.sh freetype ${{ inputs.platform }}
65+
.github/workflows/onestep.sh freetype ${{ inputs.platform }} ${{ inputs.dryrun }}
5866
if [[ ${{ inputs.platform }} == android ]]; then
5967
echo '------compile android fontconfig------------------------------------'
6068
rm -rf build || git reset --hard || git pull origin
@@ -64,42 +72,42 @@ jobs:
6472
echo '------compile harfbuzz------------------------------------'
6573
rm -rf build || git reset --hard || git pull origin
6674
.github/workflows/install-dependencies.sh harfbuzz ${{ inputs.platform }}
67-
.github/workflows/onestep.sh harfbuzz ${{ inputs.platform }}
75+
.github/workflows/onestep.sh harfbuzz ${{ inputs.platform }} ${{ inputs.dryrun }}
6876
echo '------compile ass------------------------------------'
6977
rm -rf build || git reset --hard || git pull origin
70-
.github/workflows/install-dependencies.sh ass ${{ inputs.platform }}
71-
.github/workflows/onestep.sh ass ${{ inputs.platform }}
78+
.github/workflows/install-dependencies.sh ass ${{ inputs.platform }}
79+
.github/workflows/onestep.sh ass ${{ inputs.platform }} ${{ inputs.dryrun }}
7280
echo '------compile yuv------------------------------------'
7381
rm -rf build || git reset --hard || git pull origin
74-
.github/workflows/onestep.sh yuv ${{ inputs.platform }}
82+
.github/workflows/onestep.sh yuv ${{ inputs.platform }} ${{ inputs.dryrun }}
7583
echo '------compile soundtouch------------------------------------'
7684
rm -rf build || git reset --hard || git pull origin
77-
.github/workflows/onestep.sh soundtouch ${{ inputs.platform }}
85+
.github/workflows/onestep.sh soundtouch ${{ inputs.platform }} ${{ inputs.dryrun }}
7886
echo '------compile opus------------------------------------'
7987
rm -rf build || git reset --hard || git pull origin
80-
.github/workflows/onestep.sh opus ${{ inputs.platform }}
88+
.github/workflows/onestep.sh opus ${{ inputs.platform }} ${{ inputs.dryrun }}
8189
echo '------compile openssl------------------------------------'
8290
rm -rf build || git reset --hard || git pull origin
83-
.github/workflows/onestep.sh openssl ${{ inputs.platform }}
91+
.github/workflows/onestep.sh openssl ${{ inputs.platform }} ${{ inputs.dryrun }}
8492
echo '------compile dvdread------------------------------------'
8593
rm -rf build || git reset --hard || git pull origin
86-
.github/workflows/onestep.sh dvdread ${{ inputs.platform }}
94+
.github/workflows/onestep.sh dvdread ${{ inputs.platform }} ${{ inputs.dryrun }}
8795
echo '------compile bluray------------------------------------'
8896
rm -rf build || git reset --hard || git pull origin
8997
.github/workflows/install-dependencies.sh bluray ${{ inputs.platform }}
90-
.github/workflows/onestep.sh bluray ${{ inputs.platform }}
98+
.github/workflows/onestep.sh bluray ${{ inputs.platform }} ${{ inputs.dryrun }}
9199
echo '------compile dav1d------------------------------------'
92100
rm -rf build || git reset --hard || git pull origin
93-
.github/workflows/onestep.sh dav1d ${{ inputs.platform }}
101+
.github/workflows/onestep.sh dav1d ${{ inputs.platform }} ${{ inputs.dryrun }}
94102
echo '------compile uavs3d------------------------------------'
95103
rm -rf build || git reset --hard || git pull origin
96-
.github/workflows/onestep.sh uavs3d ${{ inputs.platform }}
104+
.github/workflows/onestep.sh uavs3d ${{ inputs.platform }} ${{ inputs.dryrun }}
97105
echo '------compile smb2------------------------------------'
98106
rm -rf build || git reset --hard || git pull origin
99-
.github/workflows/onestep.sh smb2 ${{ inputs.platform }}
107+
.github/workflows/onestep.sh smb2 ${{ inputs.platform }} ${{ inputs.dryrun }}
100108
echo '------compile ffmpeg------------------------------------'
101109
rm -rf build || git reset --hard || git pull origin
102110
.github/workflows/install-dependencies.sh ffmpeg ${{ inputs.platform }}
103-
.github/workflows/onestep.sh ffmpeg ${{ inputs.platform }}
111+
.github/workflows/onestep.sh ffmpeg ${{ inputs.platform }} ${{ inputs.dryrun }}
104112
env:
105113
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}

.github/workflows/apple-android-common.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ on:
2626
- ios
2727
- tvos
2828
- macos
29+
dryrun:
30+
description: 'just run workflow,but not deploy'
31+
required: false
32+
type: choice
33+
default: 'false'
34+
options:
35+
- true
36+
- false
2937
lib:
3038
description: 'choose a lib for compile'
3139
required: true
@@ -73,6 +81,6 @@ jobs:
7381
- name: Install dependencies
7482
run: .github/workflows/install-dependencies.sh ${{ inputs.lib }} ${{ inputs.platform }}
7583
- name: One Step
76-
run: .github/workflows/onestep.sh ${{ inputs.lib }} ${{ inputs.platform }}
84+
run: .github/workflows/onestep.sh ${{ inputs.lib }} ${{ inputs.platform }} ${{ inputs.dryrun }}
7785
env:
7886
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}

.github/workflows/onestep.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ set -e
88

99
export LIB_NAME=$1
1010
export PLAT=$2
11+
12+
if [[ -z $3 && $3 == 'true' ]];then
13+
export DRYRUN=1
14+
else
15+
export DRYRUN=
16+
fi
17+
1118
export HOMEBREW_NO_AUTO_UPDATE=1
1219
export RELEASE_DATE=$(TZ=UTC-8 date +'%y%m%d%H%M%S')
1320
export RELEASE_VERSION=$(grep GIT_REPO_VERSION= ./configs/libs/${LIB_NAME}.sh | tail -n 1 | awk -F = '{printf "%s",$2}')
@@ -142,6 +149,10 @@ function upgrade()
142149
function publish()
143150
{
144151
echo "---Create Release--------------------------------------"
152+
if [[ $DRYRUN ]];then
153+
echo "DRYRUN: gh release create $TAG -t $TITLE $DIST_DIR/*.*"
154+
return
155+
fi
145156
upgrade
146157
gh release create $TAG -t $TITLE $DIST_DIR/*.*
147158
}

0 commit comments

Comments
 (0)