cd: fix windows build error due to nightly version format

This commit is contained in:
Kingkor Roy Tirtho 2024-05-04 20:39:36 +06:00
parent 937a706ac9
commit 7ad67fa3fa

View File

@ -42,9 +42,10 @@ jobs:
if: ${{ inputs.channel == 'nightly' }}
run: |
choco install sed make yq -y
yq -i '.version |= sub("\+\d+", "+${{ inputs.channel }}.")' pubspec.yaml
yq -i '.version |= sub("\+\d+", "-${{ inputs.channel }}+")' pubspec.yaml
yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml
"BUILD_VERSION=${{ inputs.version }}+${{ inputs.channel }}.${{ github.run_number }}" >> $env:GITHUB_ENV
"BUILD_VERSION=${{ inputs.version }}-${{ inputs.channel }}+${{ github.run_number }}" >> $env:GITHUB_ENV
shell: bash
- name: BUILD_VERSION Env (stable)
if: ${{ inputs.channel == 'stable' }}