From 64382b64c1dac5ea4ad2985936dade35ffd2c348 Mon Sep 17 00:00:00 2001 From: GhostFlying <4019569+GhostFlying@users.noreply.github.com> Date: Thu, 19 Jun 2025 17:42:44 +0800 Subject: [PATCH] [Infra] add release workflow for harmony OS Add GitHub workflow for Harmony SDK releases. --- .github/workflows/harmony-release.yml | 48 +++++++++++++++++++++++++++ harmony/oh-package.json5 | 2 +- harmony/primjs/oh-package.json5 | 2 +- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/harmony-release.yml diff --git a/.github/workflows/harmony-release.yml b/.github/workflows/harmony-release.yml new file mode 100644 index 0000000..bad941a --- /dev/null +++ b/.github/workflows/harmony-release.yml @@ -0,0 +1,48 @@ +name: harmony sdk release + +# on: +# workflow_dispatch: +# inputs: +# tag: +# description: 'release tag' +# required: true +# type: string +on: + pull_request: + branches: [ develop ] + +jobs: + harmony-release: + runs-on: lynx-custom-dind + container: + image: ghcr.io/lynx-family/ubuntu24.04-harmony:lastest + options: --cap-add=NET_ADMIN + credentials: + username: lynx-family + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Set MTU + run: | + sudo apt install --no-install-recommends -y iproute2 + sudo ip link set dev eth0 mtu 1450 # remain 50 for k8s overlay + echo "MTU set successfully" + - name: Check env + run: | + whoami + pwd + ls -l + ls -l /__w/primjs/primjs + - name: Download Source + uses: actions/checkout@v4.2.2 + - name: Install deps + shell: bash + run: | + source tools/envsetup.sh + hab sync . -f + - name: Build & Publish + run: | + ohpm config set publish_id ${{ secrets.HARMONY_PUBLISH_ID }} + cd harmony + echo ${{ secrets.HARMONY_PUBLISH_KEY }} > publish.key + ohpm config set key_path ./publish.key + ohpm run publish \ No newline at end of file diff --git a/harmony/oh-package.json5 b/harmony/oh-package.json5 index e457e7e..6c364a7 100644 --- a/harmony/oh-package.json5 +++ b/harmony/oh-package.json5 @@ -4,7 +4,7 @@ "dependencies": { }, "scripts": { - "prepare": "./scripts/build.py --build_napi_v8 --modules primjs --publish_har --build_type Release --build_napi_adapter" + "publish": "./scripts/build.py --build_napi_v8 --modules primjs --publish_har --build_type Release --build_napi_adapter" }, "devDependencies": { } diff --git a/harmony/primjs/oh-package.json5 b/harmony/primjs/oh-package.json5 index cff433c..5e4e1c9 100644 --- a/harmony/primjs/oh-package.json5 +++ b/harmony/primjs/oh-package.json5 @@ -6,5 +6,5 @@ "author": "lynx", "license": "Apache-2.0", "dependencies": {}, - "version": "2.11.1-rc.1" + "version": "0.0.1-alpha.1" } \ No newline at end of file