This commit is contained in:
@@ -12,11 +12,11 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
# - name: Setup Node.js
|
||||
# uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 16
|
||||
# cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -24,10 +24,10 @@ jobs:
|
||||
# 安装HBuilderX命令行工具
|
||||
npm install -g hbuilderx-cli
|
||||
|
||||
- name: Build H5 project
|
||||
run: |
|
||||
# 执行HBuild项目构建
|
||||
npm run build
|
||||
# - name: Build H5 project
|
||||
# run: |
|
||||
# # 执行HBuild项目构建
|
||||
# npm run build
|
||||
|
||||
- name: Cloud package (Android)
|
||||
run: |
|
||||
@@ -36,26 +36,12 @@ jobs:
|
||||
--project . \
|
||||
--platform android \
|
||||
--appid ${{ secrets.HBUILDER_APPID }} \
|
||||
--username ${{ secrets.HBUILDER_USERNAME }} \
|
||||
--password ${{ secrets.HBUILDER_PASSWORD }} \
|
||||
--username ${{ secrets.HBUILDERX_USERNAME }} \
|
||||
--password ${{ secrets.HBUILDERX_PASSWORD }} \
|
||||
--output ./dist
|
||||
env:
|
||||
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
|
||||
run: |
|
||||
# 重命名APK文件以便于识别版本
|
||||
@@ -90,14 +76,4 @@ jobs:
|
||||
env:
|
||||
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