@@ -63,111 +63,6 @@ jobs:
6363 allowUpdates : true
6464 body : ' '
6565
66- ios-explorer-build :
67- timeout-minutes : 60
68- runs-on : lynx-darwin-14-medium
69- needs : get-version
70- strategy :
71- matrix :
72- arch : [arm64, x86_64]
73- steps :
74- - name : Download Source
75- uses : actions/checkout@v4.2.2
76- with :
77- path : lynx
78- ref : ${{ github.event.inputs.commitId || github.ref }}
79- fetch-depth : 0
80- - name : Build Explorer App
81- uses : ./lynx/.github/actions/ios-explorer-build
82- with :
83- build-arch : ${{ matrix.arch }}
84- - name : push explorer to release
85- uses : ncipollo/release-action@v1
86- with :
87- tag : ${{ needs.get-version.outputs.version }}
88- token : ${{ secrets.GITHUB_TOKEN }}
89- artifacts : ' ${{ github.workspace }}/lynx/LynxExplorer-${{ matrix.arch }}.app.tar.gz'
90- allowUpdates : true
91- body : ' '
92-
93- harmony-explorer-build :
94- runs-on : lynx-custom-container
95- container :
96- image : ghcr.io/lynx-family/ubuntu24.04-harmony@sha256:bf493c3710de3c44bfa84caf402c0727b9310c42497f6e52580ad441ea640ef1
97- credentials :
98- username : lynx-family
99- password : ${{ secrets.GITHUB_TOKEN }}
100- needs : get-version
101- defaults :
102- run :
103- working-directory : ${{ github.workspace }}
104- shell : bash
105- steps :
106- - name : Download Source
107- uses : actions/checkout@v4.2.2
108- with :
109- path : lynx
110- ref : ${{ github.event.inputs.commitId || github.ref }}
111- fetch-depth : 0
112- - name : Build Explorer App
113- uses : ./lynx/.github/actions/harmony-explorer-build
114- - name : push explorer to release
115- uses : ncipollo/release-action@v1
116- with :
117- tag : ${{ needs.get-version.outputs.version }}
118- token : ${{ secrets.GITHUB_TOKEN }}
119- artifacts : ' ${{ github.workspace }}/lynx/explorer/harmony/lynx_explorer/build/default/outputs/default/lynx_explorer-default-unsigned.hap'
120- allowUpdates : true
121- body : ' '
122-
123- android-sdk-release :
124- runs-on : ubuntu-22.04
125- needs : get-version
126- timeout-minutes : 240
127- steps :
128- - name : Download Source
129- uses : actions/checkout@v4.2.2
130- with :
131- path : lynx
132- ref : ${{ github.event.inputs.commitId || github.ref }}
133- fetch-depth : 0
134- - name : Free up disk space
135- uses : ./lynx/.github/actions/free-android-disk
136- - name : Python Setup
137- uses : actions/setup-python@v5
138- with :
139- python-version : ' 3.13'
140- - name : Setup Android environment
141- uses : ./lynx/.github/actions/setup-android-env
142- - name : Install Common Dependencies
143- uses : ./lynx/.github/actions/common-deps
144- with :
145- cache-backend : ' github'
146- - name : Android SDK Release
147- uses : ./lynx/.github/actions/android-sdk-release
148- with :
149- version : ${{ needs.get-version.outputs.version }}
150- signingKeyId : ${{ secrets.SIGNING_KEY_ID }}
151- signingPassword : ${{ secrets.SIGNING_PASSWORD }}
152- signingSecretKey : ${{ secrets.SIGNING_SECRET_KEY }}
153- abiList : ' armeabi-v7a,x86,x86_64,arm64-v8a'
154- - name : Package maven artifacts
155- run : |-
156- cd $GITHUB_WORKSPACE/lynx
157- pushd platform/android
158- ./gradlew zipArtifacts -Pversion=${{ needs.get-version.outputs.version }} getArtifactList
159- popd
160- pushd platform/android/build
161- artifact_list=$(<artifact-list)
162- echo "::set-output name=artifact_list::$artifact_list"
163- popd
164- id : build_artifact
165- - name : Publish artifact to maven
166- uses : lynx-infra/maven-publish-action@53b4da2f23f9cfc4e905b135eda2724fcf5a0f0e
167- with :
168- portal_api_token : ${{ secrets.PORTAL_API_TOKEN }}
169- artifact_path_list : ${{ steps.build_artifact.outputs.artifact_list }}
170-
17166 ios-sdk-publish :
17267 timeout-minutes : 60
17368 runs-on : macos-14
@@ -202,234 +97,54 @@ jobs:
20297 tag : ${{ needs.get-version.outputs.version }}
20398 cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
20499 github_token : ${{ secrets.GITHUB_TOKEN }}
205- component : all
206- - name : Publish iOS dev SDK
100+ component : LynxBase
101+ - name : Publish iOS SDK
207102 uses : ./lynx/.github/actions/ios-sdk-publish
208- env :
209- LYNX_ENABLE_RECORDER : 1
210103 with :
211- version : ${{ needs.get-version.outputs.version }}-dev
104+ version : ${{ needs.get-version.outputs.version }}
212105 tag : ${{ needs.get-version.outputs.version }}
213106 cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
214107 github_token : ${{ secrets.GITHUB_TOKEN }}
215- component : all
216-
217- cocoapods-lynx-library-publish :
218- timeout-minutes : 30
219- runs-on : ubuntu-22.04
220- needs : get-version
221- environment : rubygems
222- permissions :
223- contents : read
224- steps :
225- - name : Download Source
226- uses : actions/checkout@v4.2.2
227- with :
228- ref : ${{ github.event.inputs.commitId || github.ref }}
229- fetch-depth : 0
230- path : lynx
231- - name : Set up Ruby
232- uses : ruby/setup-ruby@v1
233- with :
234- ruby-version : ' 3.1'
235- - name : Resolve gem version
236- id : gem_version
237- env :
238- RELEASE_VERSION : ${{ needs.get-version.outputs.version }}
239- run : |-
240- gem_version=$(ruby -e "puts Gem::Version.new(ENV.fetch('RELEASE_VERSION')).to_s")
241- echo "Gem version: $gem_version"
242- echo "version=$gem_version" >> "$GITHUB_OUTPUT"
243- - name : Check published version
244- id : published_version
245- run : |-
246- versions=$(gem list --remote --exact --all cocoapods-lynx-library || true)
247- echo "Published versions: ${versions:-none}"
248- if echo "$versions" | tr '(), ' '\n' | grep -Fx "${{ steps.gem_version.outputs.version }}" > /dev/null; then
249- echo "publish_needed=false" >> "$GITHUB_OUTPUT"
250- else
251- echo "publish_needed=true" >> "$GITHUB_OUTPUT"
252- fi
253- - name : Test
254- run : |-
255- cd $GITHUB_WORKSPACE/lynx/tools/ios_tools/cocoapods-lynx-library
256- ruby -Itest test/autolink_test.rb
257- - name : Build
258- id : build_gem
259- env :
260- GEM_VERSION : ${{ steps.gem_version.outputs.version }}
261- run : |-
262- cd $GITHUB_WORKSPACE/lynx/tools/ios_tools/cocoapods-lynx-library
263- ruby <<'RUBY'
264- path = 'cocoapods-lynx-library.gemspec'
265- version = ENV.fetch('GEM_VERSION')
266- content = File.read(path)
267- updated = content.sub(/spec\.version\s*=\s*['"][^'"]+['"]/, "spec.version = '#{version}'")
268- abort "Unable to update #{path} version" if updated == content
269- File.write(path, updated)
270- RUBY
271- gem build cocoapods-lynx-library.gemspec | tee gem-build.log
272- gem_file=$(awk -F': ' '/File:/ {print $2}' gem-build.log | tail -n 1)
273- echo "gem_file=$gem_file" >> "$GITHUB_OUTPUT"
274- ruby -rrubygems/package -e 'spec = Gem::Package.new(ARGV.fetch(0)).spec; puts "#{spec.name} #{spec.version}"; puts spec.summary' "$gem_file"
275- - name : Upload gem artifact
276- uses : actions/upload-artifact@v4
277- with :
278- name : cocoapods-lynx-library-${{ steps.gem_version.outputs.version }}
279- path : lynx/tools/ios_tools/cocoapods-lynx-library/${{ steps.build_gem.outputs.gem_file }}
280- - name : Publish CocoaPods plugin
281- if : steps.published_version.outputs.publish_needed == 'true'
282- env :
283- GEM_HOST_API_KEY : ${{ secrets.RUBYGEMS_API_KEY }}
284- run : |-
285- cd $GITHUB_WORKSPACE/lynx/tools/ios_tools/cocoapods-lynx-library
286- if [ -z "$GEM_HOST_API_KEY" ]; then
287- echo "RUBYGEMS_API_KEY is required to publish cocoapods-lynx-library."
288- exit 1
289- fi
290- gem push "${{ steps.build_gem.outputs.gem_file }}"
291-
292- harmony-sdk-publish :
293- name : Publish Harmony SDK (${{ matrix.label }})
294- runs-on : lynx-custom-container
295- container :
296- image : ghcr.io/lynx-family/ubuntu24.04-harmony@sha256:25913874dad0557526b44f9c9ab30b9873080009db85bb569d718d2bb5f0e074
297- credentials :
298- username : lynx-family
299- password : ${{ secrets.GITHUB_TOKEN }}
300- defaults :
301- run :
302- shell : bash
303- needs : get-version
304- strategy :
305- matrix :
306- include :
307- - version_suffix : ' '
308- modules : ' default'
309- build_param : ' '
310- label : ' formal'
311- - version_suffix : ' -dev'
312- modules : ' lynx lynx_devtool lynx_base'
313- build_param : ' --dev'
314- label : ' dev'
315- steps :
316- - name : Install Rust toolchain
317- uses : actions-rs/toolchain@v1
318- with :
319- toolchain : stable
320- profile : minimal
321- override : true
322- - name : Install git-cliff
323- run : |
324- cargo install git-cliff --locked
325- git-cliff --version
326- - name : Download Source
327- uses : actions/checkout@v4.2.2
328- with :
329- path : lynx
330- fetch-depth : 0
331- fetch-tags : true
332- ref : ${{ github.event.inputs.commitId || github.ref }}
333- - name : Get latest tag
334- id : get-latest-tag
335- uses : ./lynx/.github/actions/get-latest-tag
336- with :
337- current-tag : ${{ needs.get-version.outputs.version }}
338- - name : Install Common Dependencies
339- uses : ./lynx/.github/actions/common-deps
340- with :
341- cache-key-prefix : ' -container'
342- - name : Generate Change Log
343- run : |
344- cd $GITHUB_WORKSPACE/lynx
345- source tools/envsetup.sh
346- COMMIT_ID=$(git rev-list -n 1 ${{ steps.get-latest-tag.outputs.latest-tag }})
347- python3 explorer/harmony/script/generate_changelog.py --version ${{ needs.get-version.outputs.version }}${{ matrix.version_suffix }} --modules ${{ matrix.modules }} --base_commit $COMMIT_ID
348- - name : Build Harmony SDK
349- run : |
350- cd $GITHUB_WORKSPACE/lynx
351- source tools/envsetup.sh
352- pushd platform/harmony && ohpm install && popd
353- pushd explorer/harmony && ohpm install && popd
354- python3 explorer/harmony/script/build.py ${{ matrix.build_param }} --build_lynx_core --build_har --modules ${{ matrix.modules }} --override_version ${{ needs.get-version.outputs.version }}${{ matrix.version_suffix }}
355- - name : Publish Harmony SDK
356- run : |
357- cd $GITHUB_WORKSPACE/lynx
358- source tools/envsetup.sh
359- export PUBLISH_KEY_PASSPHRASE=${{ secrets.HARMONY_PUBLISH_KEY_PASSPHRASE }}
360- cat << EOF > publish_key
361- ${{ secrets.HARMONY_PUBLISH_KEY }}
362- EOF
363- ohpm config set publish_registry https://ohpm.openharmony.cn/ohpm
364- export PUBLISH_ID=${{ secrets.HARMONY_PUBLISH_ID }}
365- export KEY_PATH=$GITHUB_WORKSPACE/lynx/publish_key
366- python3 explorer/harmony/script/publish.py --modules ${{ matrix.modules }} --version ${{ needs.get-version.outputs.version }}${{ matrix.version_suffix }}
367-
368- macos-explorer-release :
369- timeout-minutes : 60
370- runs-on : lynx-darwin-14-medium
371- needs : get-version
372- strategy :
373- matrix :
374- arch : [arm64, x64]
375- steps :
376- - name : Download Source
377- uses : actions/checkout@v4.2.2
378- with :
379- path : lynx
380- ref : ${{ github.event.inputs.commitId || github.ref }}
381- fetch-depth : 0
382- - name : Build macOS Explorer
383- uses : ./lynx/.github/actions/macos-explorer-build
384- with :
385- build-arch : ${{ matrix.arch }}
386- - name : push explorer to release
387- uses : ncipollo/release-action@v1
108+ component : Lynx
109+ - name : Publish iOS SDK
110+ uses : ./lynx/.github/actions/ios-sdk-publish
388111 with :
112+ version : ${{ needs.get-version.outputs.version }}
389113 tag : ${{ needs.get-version.outputs.version }}
390- token : ${{ secrets.GITHUB_TOKEN }}
391- artifacts : ' ${{ github.workspace }}/lynx/LynxExplorer-macos-${{ matrix.arch }}.app.tar.gz,${{ github.workspace }}/lynx/out/Default/lynx_sdk_macos_${{ matrix.arch }}.zip'
392- allowUpdates : true
393- body : ' '
394-
395- windows-explorer-release :
396- timeout-minutes : 60
397- runs-on : lynx-windows-2022-large
398- needs : get-version
399- strategy :
400- matrix :
401- arch : [x86, x64]
402- steps :
403- - name : Configure Git
404- shell : PowerShell
405- run : |
406- git config --global core.autocrlf false
407- git config --global core.eol lf
408- git config --global http.sslBackend "schannel"
409- working-directory : ./
410- - name : Download Source
411- uses : actions/checkout@v4.2.2
412- with :
413- path : lynx
414- ref : ${{ github.event.inputs.commitId || github.ref }}
415- fetch-depth : 0
416- - name : Python Setup
417- uses : actions/setup-python@v5
114+ cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
115+ github_token : ${{ secrets.GITHUB_TOKEN }}
116+ component : BaseDevtool
117+ - name : Publish iOS SDK
118+ uses : ./lynx/.github/actions/ios-sdk-publish
418119 with :
419- python-version : ' 3.13'
420- - name : Install Common Dependencies
421- uses : ./lynx/.github/actions/windows-common-deps
120+ version : ${{ needs.get-version.outputs.version }}
121+ tag : ${{ needs.get-version.outputs.version }}
122+ cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
123+ github_token : ${{ secrets.GITHUB_TOKEN }}
124+ component : LynxDevtool
125+ - name : Publish iOS SDK
126+ uses : ./lynx/.github/actions/ios-sdk-publish
422127 with :
423- target : ' clay'
424- - name : Build windows Explorer
425- uses : ./lynx/.github/actions/windows-explorer-build
128+ version : ${{ needs.get-version.outputs.version }}
129+ tag : ${{ needs.get-version.outputs.version }}
130+ cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
131+ github_token : ${{ secrets.GITHUB_TOKEN }}
132+ component : LynxService
133+ - name : Publish iOS SDK
134+ uses : ./lynx/.github/actions/ios-sdk-publish
426135 with :
427- build-arch : ${{ matrix.arch }}
428- - name : push explorer to release
429- uses : ncipollo/release-action@v1
136+ version : ${{ needs.get-version.outputs.version }}
137+ tag : ${{ needs.get-version.outputs.version }}
138+ cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
139+ github_token : ${{ secrets.GITHUB_TOKEN }}
140+ component : XElement
141+ - name : Publish iOS dev SDK
142+ uses : ./lynx/.github/actions/ios-sdk-publish
143+ env :
144+ LYNX_ENABLE_RECORDER : 1
430145 with :
146+ version : ${{ needs.get-version.outputs.version }}-dev
431147 tag : ${{ needs.get-version.outputs.version }}
432- token : ${{ secrets.GITHUB_TOKEN }}
433- artifacts : ' ${{ github.workspace }}/lynx/LynxExplorer-windows-${{ matrix.arch }}.tar.gz,${{ github.workspace }}/lynx/out/Default/lynx_sdk_windows_${{ matrix.arch }}.zip'
434- allowUpdates : true
435- body : ' '
148+ cocoapods_trunk_token : ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
149+ github_token : ${{ secrets.GITHUB_TOKEN }}
150+ component : all
0 commit comments