Skip to content

Commit 6d2dd5e

Browse files
clover2123ksh8281
authored andcommitted
Update release actions
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
1 parent d70a651 commit 6d2dd5e

File tree

3 files changed

+31
-43
lines changed

3 files changed

+31
-43
lines changed

.github/workflows/android-release.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Android-Release
22

33
on:
4-
schedule:
5-
# scheduled to run UTC 22:00 (07:00 in South Korea), Every 1st of the month
6-
- cron: '0 22 1 * *'
7-
workflow_dispatch:
4+
push:
5+
tags:
6+
- "v*.*.*"
87

98
jobs:
109
build-android-on-ubuntu:
@@ -37,14 +36,17 @@ jobs:
3736
./build/android/escargot/build/**/escargot-*.jar
3837
!./build/android/escargot/build/**/escargot-*Shell.aar
3938
if-no-files-found: error
40-
overwrite: true
4139

4240
build-android-on-macos:
4341
runs-on: macos-13
4442
steps:
4543
- uses: actions/checkout@v4
4644
with:
4745
submodules: true
46+
- name: Install Packages
47+
run: |
48+
brew update
49+
brew install ninja pkg-config icu4c
4850
- name: Set up JDK
4951
uses: actions/setup-java@v4.1.0
5052
with:
@@ -65,9 +67,8 @@ jobs:
6567
path: |
6668
./build/android/escargot/build/libs/escargot-mac.jar
6769
if-no-files-found: error
68-
overwrite: true
6970

70-
merge-upload-release:
71+
merge-update-release:
7172
needs: [build-android-on-ubuntu, build-android-on-macos]
7273
runs-on: ubuntu-latest
7374
steps:
@@ -88,12 +89,9 @@ jobs:
8889
find . -type f -name "escargot-*.aar" -exec mv {} . \;
8990
find . -type f -name "escargot-*.jar" -exec mv {} . \;
9091
ls -R ./
91-
- name: Upload final artifacts
92-
uses: actions/upload-artifact@v4
92+
find ./ -type f -name "escargot-*.aar" -o -name "escargot-*.jar" | zip Android-Release-${{ env.RELEASE_DATE }}.zip -@
93+
- name: Upload to release
94+
uses: softprops/action-gh-release@v2
9395
with:
94-
name: Android-Release-${{ env.RELEASE_DATE }}
95-
path: |
96-
./artifacts/escargot-*.aar
97-
./artifacts/escargot-*.jar
98-
if-no-files-found: error
99-
overwrite: true
96+
files: |
97+
artifacts/Android-Release-${{ env.RELEASE_DATE }}.zip

.github/workflows/release.yml

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Upload
3939
uses: actions/upload-artifact@v4
4040
with:
41-
name: mac64-result
41+
name: build-artifact-mac64
4242
path: out/escargot-mac64
4343

4444
build-mac64arm:
@@ -69,7 +69,7 @@ jobs:
6969
- name: Upload
7070
uses: actions/upload-artifact@v4
7171
with:
72-
name: mac64arm-result
72+
name: build-artifact-mac64arm
7373
path: out/escargot-mac64arm
7474

7575
build-windows:
@@ -115,7 +115,7 @@ jobs:
115115
- name: Upload
116116
uses: actions/upload-artifact@v4
117117
with:
118-
name: win-${{ matrix.arch }}-result
118+
name: build-artifact-win-${{ matrix.arch }}
119119
path: out\escargot-win-${{ matrix.arch }}.exe
120120

121121
build-linux:
@@ -155,38 +155,19 @@ jobs:
155155
- name: Upload
156156
uses: actions/upload-artifact@v4
157157
with:
158-
name: linux-result
158+
name: build-artifact-linux
159159
path: out/escargot-linux-*
160160

161161
update-release:
162162
needs: [build-mac64, build-mac64arm, build-windows, build-linux]
163163
runs-on: ubuntu-latest
164164
steps:
165-
- name: Download mac64 result
165+
- name: Download build artifacts
166166
uses: actions/download-artifact@v4
167167
with:
168-
name: mac64-result
169-
path: artifacts
170-
- name: Download mac64arm result
171-
uses: actions/download-artifact@v4
172-
with:
173-
name: mac64arm-result
174-
path: artifacts
175-
- name: Download win32 result
176-
uses: actions/download-artifact@v4
177-
with:
178-
name: win-x86-result
179-
path: artifacts
180-
- name: Download win64 result
181-
uses: actions/download-artifact@v4
182-
with:
183-
name: win-x64-result
184-
path: artifacts
185-
- name: Download linux result
186-
uses: actions/download-artifact@v4
187-
with:
188-
name: linux-result
189168
path: artifacts
169+
pattern: build-artifact-*
170+
merge-multiple: true
190171
- name: Upload to release
191172
uses: softprops/action-gh-release@v2
192173
with:

build/android/escargot/build.gradle

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,17 @@ task buildCMakeNativeNoNDK(type: Exec) {
110110
}
111111
os.toString().trim()
112112
}
113-
environment("PKG_CONFIG_PATH", "/usr/local/opt/icu4c/lib/pkgconfig")
114-
commandLine "/usr/bin/env", "cmake", "-DESCARGOT_HOST=darwin", "-DESCARGOT_ARCH=x64", "-DESCARGOT_OUTPUT=static_lib", "-DUNDER_NDK=OFF", "-DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF",
113+
var icu4cPath = new ByteArrayOutputStream().withStream { os ->
114+
exec {
115+
commandLine "sh", "-c", "brew --prefix icu4c"
116+
standardOutput = os
117+
}
118+
os.toString().trim()
119+
}
120+
var pkgConfigPath = icu4cPath + "/lib/pkgconfig"
121+
environment("PKG_CONFIG_PATH", pkgConfigPath)
122+
commandLine "/usr/bin/env", "cmake", "-DESCARGOT_HOST=darwin", "-DESCARGOT_ARCH=x64", "-DESCARGOT_OUTPUT=static_lib", "-DUNDER_NDK=OFF",
123+
"-DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF",
115124
"-DJAVA_HOME=" + javaHome, "-DJAVA_INCLUDE_PATH=" + javaHome + "/include",
116125
"-DJAVA_INCLUDE_PATH2=" + javaHome + "/include/darwin", "-DJAVA_AWT_INCLUDE_PATH=" + javaHome + "/include",
117126
srcForNativeNoNDK.absolutePath

0 commit comments

Comments
 (0)