Workflow: build for linux action

This commit is contained in:
dan63047 2024-01-02 00:43:12 +03:00
parent 64df2ec80b
commit 53defa7770
3 changed files with 41 additions and 7 deletions

View File

@ -28,7 +28,7 @@ jobs:
with:
type: 'zip'
filename: TetraStats-${{github.ref_name}}-windows.zip
directory: build/windows/runner/Release
directory: build/windows/x64/runner/Release
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
@ -36,7 +36,37 @@ jobs:
allowUpdates: true
replacesArtifacts: false
discussionCategory: autobuilded-releases
artifacts: "build/windows/runner/Release/TetraStats-${{github.ref_name}}-windows.zip"
artifacts: "build/windows/x64/runner/Release/TetraStats-${{github.ref_name}}-windows.zip"
tag: Auto-${{ github.run_number }}
body: Builded with GitHub Action workflow
token: ${{ secrets.TOKEN }}
build-and-release-linux:
name: Build Linux App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.16.5'
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build windows --release
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: TetraStats-${{github.ref_name}}-windows.zip
directory: build/linux/x64/runner/Release/bundle
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
prerelease: true
allowUpdates: true
replacesArtifacts: false
discussionCategory: autobuilded-releases
artifacts: "build/linux/x64/runner/Release/bundle/TetraStats-${{github.ref_name}}-linux.zip"
tag: Auto-${{ github.run_number }}
body: Builded with GitHub Action workflow
token: ${{ secrets.TOKEN }}

View File

@ -674,6 +674,7 @@ class CompareState extends State<CompareView> {
100,
fractionDigits: 2,
higherIsBetter: true,
postfix: "%",
),
CompareThingy(
label: t.byEstTR,
@ -691,6 +692,7 @@ class CompareState extends State<CompareView> {
100,
fractionDigits: 2,
higherIsBetter: true,
postfix: "%",
),
],
)
@ -798,18 +800,20 @@ class CompareThingy extends StatelessWidget {
final String label;
final bool higherIsBetter;
final int? fractionDigits;
final String? postfix;
const CompareThingy(
{super.key,
required this.greenSide,
required this.redSide,
required this.label,
required this.higherIsBetter,
this.fractionDigits});
this.fractionDigits,
this.postfix});
String verdict(num greenSide, num redSide, int fraction) {
var f = NumberFormat("+#,###.##;-#,###.##");
f.maximumFractionDigits = fraction;
return f.format((greenSide - redSide));
return f.format((greenSide - redSide)) + (postfix ?? "");
}
@override
@ -841,7 +845,7 @@ class CompareThingy extends StatelessWidget {
],
)),
child: Text(
f.format(greenSide),
f.format(greenSide) + (postfix ?? ""),
style: const TextStyle(
fontSize: 22,
shadows: <Shadow>[
@ -895,7 +899,7 @@ class CompareThingy extends StatelessWidget {
],
)),
child: Text(
f.format(redSide),
f.format(redSide) + (postfix ?? ""),
style: const TextStyle(
fontSize: 22,
shadows: <Shadow>[

View File

@ -46,7 +46,7 @@ class StatCellNum extends StatelessWidget {
)
)
),
if (oldPlayerStat != null) Text(NumberFormat("+#,###.###;-#,###.###").format(playerStat - oldPlayerStat!), style: TextStyle(
if (oldPlayerStat != null) Text(comparef.format(playerStat - oldPlayerStat!), style: TextStyle(
color: higherIsBetter ?
oldPlayerStat! > playerStat ? Colors.red : Colors.green :
oldPlayerStat! < playerStat ? Colors.red : Colors.green