File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 1- name : RELEASE
1+ name : Pre release by tag
22
33on :
44 push :
@@ -29,16 +29,22 @@ jobs:
2929
3030 - name : Package Electron
3131 run : |
32- pnpm install
33- pnpm pack
32+ node ./scripts/apply-product.js
33+ echo "package.json:" && cat package.json
34+ echo "./build/package.json" && cat ./build/package.json
35+ pnpm i --no-frozen-lockfile
36+ pnpm download-extension
37+ pnpm run pack
3438 env :
3539 TARGET_PLATFORMS : darwin
40+ TARGET_ARCHES : x64,arm64
41+ PRODUCT_VERSION : ${{ github.ref_name }}
3642
3743 - uses : ' marvinpinto/action-automatic-releases@latest'
3844 with :
3945 repo_token : ' ${{ secrets.GITHUB_TOKEN }}'
4046 prerelease : true
4147 files : |
42- LICENSE
43- out-x64 /*.dmg
44- out-x64 /*.exe
48+ out/ LICENSE
49+ out/*.dmg
50+ out/*.exe
Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ function saveProductJson() {
2828 productJson [ 'sumiVersion' ] = String ( process . env . SUMI_VERSION ) . trim ( ) ;
2929 }
3030 if ( process . env . PRODUCT_VERSION ) {
31- productJson [ 'version' ] = String ( process . env . PRODUCT_VERSION ) . trim ( ) ;
31+ let _version = String ( process . env . PRODUCT_VERSION ) . trim ( ) ;
32+ if ( _version . startsWith ( 'v' ) ) {
33+ // transform tag version eg. v1.3.6 to 1.3.6
34+ _version = _version . substring ( 1 ) ;
35+ }
36+ productJson [ 'version' ] = _version ;
3237 }
3338 const jsonPath = path . join ( __dirname , '../product.json' ) ;
3439 saveWithPrettier ( jsonPath , productJson ) ;
You can’t perform that action at this time.
0 commit comments