This commit is contained in:
@@ -12,11 +12,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Node.js
|
# - name: Setup Node.js
|
||||||
uses: actions/setup-node@v3
|
# uses: actions/setup-node@v3
|
||||||
with:
|
# with:
|
||||||
node-version: 16
|
# node-version: 16
|
||||||
cache: 'npm'
|
# cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -24,10 +24,10 @@ jobs:
|
|||||||
# 安装HBuilderX命令行工具
|
# 安装HBuilderX命令行工具
|
||||||
npm install -g hbuilderx-cli
|
npm install -g hbuilderx-cli
|
||||||
|
|
||||||
- name: Build H5 project
|
# - name: Build H5 project
|
||||||
run: |
|
# run: |
|
||||||
# 执行HBuild项目构建
|
# # 执行HBuild项目构建
|
||||||
npm run build
|
# npm run build
|
||||||
|
|
||||||
- name: Cloud package (Android)
|
- name: Cloud package (Android)
|
||||||
run: |
|
run: |
|
||||||
@@ -36,26 +36,12 @@ jobs:
|
|||||||
--project . \
|
--project . \
|
||||||
--platform android \
|
--platform android \
|
||||||
--appid ${{ secrets.HBUILDER_APPID }} \
|
--appid ${{ secrets.HBUILDER_APPID }} \
|
||||||
--username ${{ secrets.HBUILDER_USERNAME }} \
|
--username ${{ secrets.HBUILDERX_USERNAME }} \
|
||||||
--password ${{ secrets.HBUILDER_PASSWORD }} \
|
--password ${{ secrets.HBUILDERX_PASSWORD }} \
|
||||||
--output ./dist
|
--output ./dist
|
||||||
env:
|
env:
|
||||||
HBUILDER_CLOUD_PACKAGE: true
|
HBUILDER_CLOUD_PACKAGE: true
|
||||||
|
|
||||||
- name: Cloud package (iOS)
|
|
||||||
run: |
|
|
||||||
hbuilderx package \
|
|
||||||
--project . \
|
|
||||||
--platform ios \
|
|
||||||
--appid ${{ secrets.HBUILDER_APPID }} \
|
|
||||||
--username ${{ secrets.HBUILDER_USERNAME }} \
|
|
||||||
--password ${{ secrets.HBUILDER_PASSWORD }} \
|
|
||||||
--output ./dist
|
|
||||||
env:
|
|
||||||
HBUILDER_CLOUD_PACKAGE: true
|
|
||||||
# 可选:仅在有标签推送时才构建iOS版本
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
|
|
||||||
- name: Prepare release assets
|
- name: Prepare release assets
|
||||||
run: |
|
run: |
|
||||||
# 重命名APK文件以便于识别版本
|
# 重命名APK文件以便于识别版本
|
||||||
@@ -90,14 +76,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
- name: Upload iOS Asset
|
|
||||||
if: startsWith(github.ref, 'refs/tags/') && -f ./dist/app-release-${{ github.sha }}.ipa
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./dist/app-release-${{ github.sha }}.ipa
|
|
||||||
asset_name: app-ios-${{ github.ref_name }}.ipa
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user