From 47bd94da28e9f6fa5b26e7527a9daf3691a35971 Mon Sep 17 00:00:00 2001 From: Hiddify Date: Wed, 6 Mar 2024 18:17:15 +0100 Subject: [PATCH] make it universal for all os --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5c6cdc5..7cc8243c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,9 +87,8 @@ jobs: uses: actions/checkout@v3 - name: update draft version if: ${{ inputs.upload-artifact && inputs.tag-name == 'draft' }} - run: | - draftBuildCode="${{ needs.test.outputs.draftBuildCode }}" - sed -i "0,/version: [0-9.]*+/{s/version: [0-9.]*+/version: $draftBuildCode/}" pubspec.yaml + run: | + python -c "import re; content = open('pubspec.yaml').read(); content = re.sub(r'(version: [0-9.]*\+)', r'\1{}'.format('${{ needs.test.outputs.draftBuildCode }}'), content, count=1); open('pubspec.yaml', 'w').write(content)" - name: Setup Flutter uses: subosito/flutter-action@v2 with: