mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-16 00:55:17 +00:00
cd: add hosted server configurations in workflow
This commit is contained in:
parent
24d7b5b851
commit
1956692484
8
.github/workflows/spotube-nightly.yml
vendored
8
.github/workflows/spotube-nightly.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
curl -sS https://webi.sh/yq | sh
|
||||
yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml
|
||||
yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml
|
||||
echo '${{ secrets.DOT_ENV }}' > .env
|
||||
echo '${{ secrets.DOTENV_NIGHTLY }}' > .env
|
||||
flutter config --enable-linux-desktop
|
||||
flutter pub get
|
||||
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
curl -sS https://webi.sh/yq | sh
|
||||
yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml
|
||||
yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml
|
||||
echo '${{ secrets.DOT_ENV }}' > .env
|
||||
echo '${{ secrets.DOTENV_NIGHTLY }}' > .env
|
||||
flutter pub get
|
||||
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks
|
||||
@ -95,7 +95,7 @@ jobs:
|
||||
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
|
||||
echo '${{ secrets.DOT_ENV }}' > .env
|
||||
echo '${{ secrets.DOTENV_NIGHTLY }}' > .env
|
||||
flutter config --enable-windows-desktop
|
||||
flutter pub get
|
||||
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
@ -123,7 +123,7 @@ jobs:
|
||||
- run: brew install yq
|
||||
- run: yq -i '.version |= sub("\+\d+", "-nightly-")' pubspec.yaml
|
||||
- run: yq -i '.version += strenv(GITHUB_RUN_NUMBER)' pubspec.yaml
|
||||
- run: echo '${{ secrets.DOT_ENV }}' > .env
|
||||
- run: echo '${{ secrets.DOTENV_NIGHTLY }}' > .env
|
||||
- run: flutter config --enable-macos-desktop
|
||||
- run: flutter pub get
|
||||
- run: dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
|
8
.github/workflows/spotube-release.yml
vendored
8
.github/workflows/spotube-release.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
||||
with:
|
||||
cache: true
|
||||
- run: |
|
||||
echo '${{ secrets.DOT_ENV }}' > .env
|
||||
echo '${{ secrets.DOTENV_RELEASE }}' > .env
|
||||
flutter config --enable-windows-desktop
|
||||
flutter pub get
|
||||
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
@ -73,7 +73,7 @@ jobs:
|
||||
- uses: subosito/flutter-action@v2.8.0
|
||||
with:
|
||||
cache: true
|
||||
- run: echo '${{ secrets.DOT_ENV }}' > .env
|
||||
- run: echo '${{ secrets.DOTENV_RELEASE }}' > .env
|
||||
- run: flutter config --enable-macos-desktop
|
||||
- run: flutter pub get
|
||||
- run: dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
@ -114,7 +114,7 @@ jobs:
|
||||
# replacing & adding new release version with older version
|
||||
- run: |
|
||||
sed -i 's|%{{APPDATA_RELEASE}}%|<release version="${{ steps.tag.outputs.tag }}" date="${{ steps.date.outputs.date }}" />|' linux/com.github.KRTirtho.Spotube.appdata.xml
|
||||
echo '${{ secrets.DOT_ENV }}' > .env
|
||||
echo '${{ secrets.DOTENV_RELEASE }}' > .env
|
||||
|
||||
- run: |
|
||||
flutter config --enable-linux-desktop
|
||||
@ -149,7 +149,7 @@ jobs:
|
||||
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse
|
||||
|
||||
- run: |
|
||||
echo '${{ secrets.DOT_ENV }}' > .env
|
||||
echo '${{ secrets.DOTENV_RELEASE }}' > .env
|
||||
flutter pub get
|
||||
dart bin/create-secrets.dart '${{ secrets.LYRICS_SECRET }}' '${{ secrets.SPOTIFY_SECRET }}'
|
||||
echo '${{ secrets.KEYSTORE }}' | base64 --decode > android/app/upload-keystore.jks
|
||||
|
@ -1,11 +1,15 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
abstract class Env {
|
||||
static final String pocketbaseUrl = dotenv.get('POCKETBASE_URL');
|
||||
static final String username = dotenv.get('USERNAME');
|
||||
static final String password = dotenv.get('PASSWORD');
|
||||
static final String pocketbaseUrl =
|
||||
dotenv.get('POCKETBASE_URL', fallback: 'http://localhost:8090');
|
||||
static final String username = dotenv.get('USERNAME', fallback: 'root');
|
||||
static final String password = dotenv.get('PASSWORD', fallback: '12345678');
|
||||
|
||||
static configure() async {
|
||||
if (kReleaseMode) {
|
||||
await dotenv.load(fileName: ".env");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user