cd: fix version no. of build

This commit is contained in:
Kingkor Roy Tirtho 2022-10-11 22:49:18 +06:00
parent 0ebac05a4b
commit 933b8d58e7

View File

@ -26,7 +26,8 @@ jobs:
- run: | - run: |
curl -sS https://webi.sh/yq | sh 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 config --enable-linux-desktop
flutter pub get flutter pub get
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}' dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
@ -60,7 +61,8 @@ jobs:
- run: | - run: |
curl -sS https://webi.sh/yq | sh 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 flutter pub get
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}' dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks
@ -88,7 +90,8 @@ jobs:
cache: true cache: true
- run: | - run: |
choco install sed make yq -y 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 sed -i "s/%{{SPOTUBE_VERSION}}%/${{ env.GITHUB_RUN_NUMBER }}/" windows/runner/Runner.rc
flutter config --enable-windows-desktop flutter config --enable-windows-desktop
flutter pub get flutter pub get
@ -115,7 +118,8 @@ jobs:
with: with:
cache: true cache: true
- run: brew install yq - 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 config --enable-macos-desktop
- run: flutter pub get - run: flutter pub get
- run: dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}' - run: dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'