Skip to content

ErBWs/setup-ohos

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-ohos

A simple action to download and setup HarmonyOS NEXT (API12+) building environment in GitHub Action

  • latest CLI tools version: 6.1.1.280
  • latest SDK version: 6.1.1.125
  • latest API: 6.1.1(24)

Important

For macOS and Windows, use ErBWs/setup-ohos@v2 with CLI tools version later than 6.1.1.280.

Dependencies

  • libGL1 - Texture compression (Linux only)
  • jq - JSON processor, already embedded in GitHub Action
- name: Install dependencies
  run: |
    sudo apt-get update
    sudo apt-get install -y libgl1-mesa-dev
  shell: bash

Usage

steps:
  - name: Clone repository
    uses: actions/checkout@v4
  - name: Setup HarmonyOS CLI tools
    uses: ErBWs/setup-ohos@v2
    with:
      version: 6.1.1.280
      cache: true
  - run: hvigorw -v

Important

If you leave version blank with cache on, you need to clear your action's cache when you want to upgrade the SDK.

Options

Name Description
version Verison of CLI tools, can be 6.1.1.280, etc. Optional, leave it blank to use latest version.
cache Whether to cache the SDK, can be true or false. Optional.

Environment variables

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

Supported version

Check out ErBWs / ohos-sdk for more supported version codes

About

Set up your GitHub Actions workflow with HarmonyOS command line tools

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages