mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 02:09:06 +00:00
CI(ohos): add a condition to check for the publish code (#1863)
Added a condition to check for the presence of a release code when running the publish step
This commit is contained in:
@@ -48,6 +48,8 @@ jobs:
|
|||||||
build-ohos:
|
build-ohos:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pre_job
|
needs: pre_job
|
||||||
|
env:
|
||||||
|
OHPM_PUBLISH_CODE: ${{ secrets.OHPM_PUBLISH_CODE }}
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -185,12 +187,11 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Publish To Center Ohpm
|
- name: Publish To Center Ohpm
|
||||||
if: github.event_name == 'push'
|
|
||||||
working-directory: ./easytier-contrib/easytier-ohrs
|
working-directory: ./easytier-contrib/easytier-ohrs
|
||||||
env:
|
env:
|
||||||
OHPM_PUBLISH_CODE: ${{ secrets.OHPM_PUBLISH_CODE }}
|
|
||||||
OHPM_PRIVATE_KEY: ${{ secrets.OHPM_PRIVATE_KEY }}
|
OHPM_PRIVATE_KEY: ${{ secrets.OHPM_PRIVATE_KEY }}
|
||||||
OHPM_KEY_PASSPHRASE: ${{ secrets.OHPM_KEY_PASSPHRASE }}
|
OHPM_KEY_PASSPHRASE: ${{ secrets.OHPM_KEY_PASSPHRASE }}
|
||||||
|
if: ${{ env.OHPM_PUBLISH_CODE != '' && github.event_name == 'push' }}
|
||||||
run: |
|
run: |
|
||||||
ohpm config set publish_id "$OHPM_PUBLISH_CODE"
|
ohpm config set publish_id "$OHPM_PUBLISH_CODE"
|
||||||
ohpm config set publish_registry https://ohpm.openharmony.cn/ohpm
|
ohpm config set publish_registry https://ohpm.openharmony.cn/ohpm
|
||||||
@@ -207,8 +208,8 @@ jobs:
|
|||||||
ohpm publish easytier-ohrs.har
|
ohpm publish easytier-ohrs.har
|
||||||
|
|
||||||
- name: Publish To Private Ohpm
|
- name: Publish To Private Ohpm
|
||||||
if: github.event_name == 'push'
|
|
||||||
working-directory: ./easytier-contrib/easytier-ohrs
|
working-directory: ./easytier-contrib/easytier-ohrs
|
||||||
|
if: ${{ env.OHPM_PUBLISH_CODE != '' && github.event_name == 'push' }}
|
||||||
run: |
|
run: |
|
||||||
printf '%s' "${{ secrets.CODEARTS_PRIVATE_OHPM }}" > ~/.ohpm/.ohpmrc
|
printf '%s' "${{ secrets.CODEARTS_PRIVATE_OHPM }}" > ~/.ohpm/.ohpmrc
|
||||||
ohpm config set strict_ssl false
|
ohpm config set strict_ssl false
|
||||||
|
|||||||
Reference in New Issue
Block a user