From 42cfe4b4a6a065a4531a8b9514c6671d6b997bf5 Mon Sep 17 00:00:00 2001 From: Juan Gilsanz Polo Date: Thu, 23 Nov 2023 02:25:02 +0100 Subject: [PATCH] Updated workflow --- .github/workflows/release-beta.yaml | 15 +++---- .github/workflows/release-stable.yaml | 61 +++++++++++---------------- 2 files changed, 31 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release-beta.yaml b/.github/workflows/release-beta.yaml index 36d43d6..93b09b1 100644 --- a/.github/workflows/release-beta.yaml +++ b/.github/workflows/release-beta.yaml @@ -28,17 +28,14 @@ jobs: with: file: './pubspec.yaml' key-path: '["version"]' - - name: Split version string - uses: winterjung/split@v2 - id: splitted_version - with: - msg: "${{ steps.read_pubspec.outputs.data }}" - separator: "+" - name: Save version on env variable run: | - echo "VERSION_NAME=$(echo ${{ steps.splitted_version.outputs._0 }})" >> $GITHUB_ENV - echo "::set-output name=version_name::${{ steps.splitted_version.outputs._0 }}" - echo "::set-output name=version_number::${{ steps.splitted_version.outputs._1 }}" + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_OUTPUT + echo "VERSION_NUMBER=$(echo ${split[1]})" >> $GITHUB_OUTPUT - name: Update KeyStore password in gradle properties run: sed -i 's/#{KEYSTORE_PASS}#/${{ secrets.KEYSTORE_PASS }}/g' android/key.properties - name: Update KeyStore key password in gradle properties diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release-stable.yaml index 18da011..6611233 100644 --- a/.github/workflows/release-stable.yaml +++ b/.github/workflows/release-stable.yaml @@ -25,17 +25,14 @@ jobs: with: file: './pubspec.yaml' key-path: '["version"]' - - name: Split version string - uses: winterjung/split@v2 - id: splitted_version - with: - msg: "${{ steps.read_pubspec.outputs.data }}" - separator: "+" - name: Save version on env variable run: | - echo "VERSION_NAME=$(echo ${{ steps.splitted_version.outputs._0 }})" >> $GITHUB_ENV - echo "::set-output name=version_name::${{ steps.splitted_version.outputs._0 }}" - echo "::set-output name=version_number::${{ steps.splitted_version.outputs._1 }}" + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_OUTPUT + echo "VERSION_NUMBER=$(echo ${split[1]})" >> $GITHUB_OUTPUT - name: Update KeyStore password in gradle properties run: sed -i 's/#{KEYSTORE_PASS}#/${{ secrets.KEYSTORE_PASS }}/g' android/key.properties - name: Update KeyStore key password in gradle properties @@ -81,17 +78,14 @@ jobs: with: file: './pubspec.yaml' key-path: '["version"]' - - name: Split version string - uses: winterjung/split@v2 - id: splitted_version - with: - msg: "${{ steps.read_pubspec.outputs.data }}" - separator: "+" - name: Save version on env variable run: | - echo "VERSION_NAME=$(echo ${{ steps.splitted_version.outputs._0 }})" >> $GITHUB_ENV - echo "::set-output name=version_name::${{ steps.splitted_version.outputs._0 }}" - echo "::set-output name=version_number::${{ steps.splitted_version.outputs._1 }}" + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_OUTPUT + echo "VERSION_NUMBER=$(echo ${split[1]})" >> $GITHUB_OUTPUT - uses: subosito/flutter-action@v2 with: channel: "stable" @@ -140,17 +134,14 @@ jobs: with: file: './pubspec.yaml' key-path: '["version"]' - - name: Split version string - uses: winterjung/split@v2 - id: splitted_version - with: - msg: "${{ steps.read_pubspec.outputs.data }}" - separator: "+" - name: Save version on env variable run: | - echo "VERSION_NAME=$(echo ${{ steps.splitted_version.outputs._0 }})" >> $GITHUB_ENV - echo "::set-output name=version_name::${{ steps.splitted_version.outputs._0 }}" - echo "::set-output name=version_number::${{ steps.splitted_version.outputs._1 }}" + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_OUTPUT + echo "VERSION_NUMBER=$(echo ${split[1]})" >> $GITHUB_OUTPUT - name: Update version in debian.yaml run: sed -i 's//${{ env.VERSION_NAME }}/g' debian/debian.yaml - name: Update dependencies list @@ -202,17 +193,15 @@ jobs: with: file: './pubspec.yaml' key-path: '["version"]' - - name: Split version string - uses: winterjung/split@v2 - id: splitted_version - with: - msg: "${{ steps.read_pubspec.outputs.data }}" - separator: "+" - name: Save version on env variable + shell: bash run: | - echo "VERSION_NAME=$(echo ${{ steps.splitted_version.outputs._0 }})" >> $GITHUB_ENV - echo "::set-output name=version_name::${{ steps.splitted_version.outputs._0 }}" - echo "::set-output name=version_number::${{ steps.splitted_version.outputs._1 }}" + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_OUTPUT + echo "VERSION_NUMBER=$(echo ${split[1]})" >> $GITHUB_OUTPUT - name: Update version in innosetup config file shell: pwsh run: |