A simple action to download and setup HarmonyOS NEXT (API12+) building environment in GitHub Action
- latest CLI tools version:
6.0.0.858 - latest SDK version:
6.0.0.47 - latest API:
6.0.0(20)
cURL- Download sdklibGL1- Texture compressionjq- JSON processor, already embedded in GitHub Action
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl libgl1-mesa-dev
shell: bashsteps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup HarmonyOS CLI tools
uses: ErBWs/setup-ohos@v1
with:
version: latest
cache: true
- run: hvigorw -vImportant
If you are using latest as version with cache on, you need to clear your action's cache when you want to upgrade the SDK
| Name | Description |
|---|---|
| version | Verison of CLI tools, can be latest, 5.0.13.200, etc. |
| cache | Whether to cache the SDK, can be true or false |
If more envs are needed, feel free to file an issue and I will add it.
| Name | Value |
|---|---|
| HOS_SDK_HOME | /home/runner/ohos-sdk/command-line-tools/sdk |
| OHOS_NDK_HOME | /home/runner/ohos-sdk/command-line-tools/sdk/default/openharmony |
Check out ErBWs / ohos-sdk for more supported version codes