From 933b8d58e74182c6d5bf9439c091acd948677645 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Tue, 11 Oct 2022 22:49:18 +0600 Subject: [PATCH] cd: fix version no. of build --- .github/workflows/spotube-nightly.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/spotube-nightly.yml b/.github/workflows/spotube-nightly.yml index aea112ec..f31d7a4b 100644 --- a/.github/workflows/spotube-nightly.yml +++ b/.github/workflows/spotube-nightly.yml @@ -26,7 +26,8 @@ jobs: - run: | curl -sS https://webi.sh/yq | sh - yq -i '.version |= sub("\+\d+", "-nightly+${{ env.GITHUB_RUN_NUMBER }}")' pubspec.yaml + yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml + yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml flutter config --enable-linux-desktop flutter pub get dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}' @@ -60,7 +61,8 @@ jobs: - run: | curl -sS https://webi.sh/yq | sh - yq -i '.version |= sub("\+\d+", "-nightly+${{ env.GITHUB_RUN_NUMBER }}")' pubspec.yaml + yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml + yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml flutter pub get dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}' echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks @@ -88,7 +90,8 @@ jobs: cache: true - run: | choco install sed make yq -y - yq -i '.version |= sub("\+\d+", "-nightly+${{ env.GITHUB_RUN_NUMBER }}")' pubspec.yaml + yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml + yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml sed -i "s/%{{SPOTUBE_VERSION}}%/${{ env.GITHUB_RUN_NUMBER }}/" windows/runner/Runner.rc flutter config --enable-windows-desktop flutter pub get @@ -115,7 +118,8 @@ jobs: with: cache: true - run: brew install yq - - run: yq -i '.version |= sub("\+\d+", "-nightly+${{ env.GITHUB_RUN_NUMBER }}")' pubspec.yaml + - run: yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml + - run: yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml - run: flutter config --enable-macos-desktop - run: flutter pub get - run: dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'