mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
using base64 encoded json string instead of raw json for secrets
This commit is contained in:
parent
3c34b32356
commit
46bb8e202d
2
.github/workflows/flutter-build.yml
vendored
2
.github/workflows/flutter-build.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
cache: true
|
cache: true
|
||||||
- run: flutter config --enable-windows-desktop
|
- run: flutter config --enable-windows-desktop
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: dart bin/create-secrets.dart "${{ secrets.SECRET }}"
|
- run: dart bin/create-secrets.dart '${{ secrets.SECRET }}'
|
||||||
- run: flutter build windows
|
- run: flutter build windows
|
||||||
- run: choco install make -y
|
- run: choco install make -y
|
||||||
- run: make innoinstall
|
- run: make innoinstall
|
||||||
|
@ -8,7 +8,8 @@ void main(List<String> args) async {
|
|||||||
throw ArgumentError("Expected an argument but none was passed");
|
throw ArgumentError("Expected an argument but none was passed");
|
||||||
}
|
}
|
||||||
|
|
||||||
final val = jsonDecode(args.first);
|
var decodedSecret = utf8.decode(base64Decode(args.first));
|
||||||
|
final val = jsonDecode(decodedSecret);
|
||||||
if (val is! List) {
|
if (val is! List) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"'SECRET' Environmental Variable isn't configured properly");
|
"'SECRET' Environmental Variable isn't configured properly");
|
||||||
@ -16,5 +17,5 @@ void main(List<String> args) async {
|
|||||||
|
|
||||||
await File(path.join(
|
await File(path.join(
|
||||||
Directory.current.path, "lib/models/generated_secrets.dart"))
|
Directory.current.path, "lib/models/generated_secrets.dart"))
|
||||||
.writeAsString("final List<String> secrets = ${args.first};");
|
.writeAsString("final List<String> secrets = $decodedSecret;");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user