Skip to content

Commit

Permalink
Reimplement project
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed May 7, 2023
1 parent 6715df7 commit e511d0e
Show file tree
Hide file tree
Showing 72 changed files with 914 additions and 2,212 deletions.
101 changes: 57 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
channel: 'any'
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: Import files
if: ${{ github.event_name != 'pull_request' }}
env:
Expand All @@ -40,14 +42,12 @@ jobs:
- name: 🏭 Build nightly
if: ${{ github.ref != 'refs/tags/stable' }}
run: |
flutter doctor -v
flutter build apk -v --release --flavor development --dart-define=flavor=development
cp build/app/outputs/flutter-apk/app-development-release.apk linwood-town-android.apk
- name: 🏭 Build production
if: ${{ github.ref == 'refs/tags/stable' }}
run: |
flutter doctor -v
flutter build apk -v --release --flavor production --dart-define=flavor=production
flutter build apk -v --release --flavor production
cp build/app/outputs/flutter-apk/app-production-release.apk linwood-town-android.apk
- name: Archive
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -75,7 +75,9 @@ jobs:
run: flutter config --enable-windows-desktop
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: 🏭 Build nightly
if: ${{ github.ref != 'refs/tags/stable' }}
run: |
Expand All @@ -92,6 +94,9 @@ jobs:
Get-Content pubspec.yaml | Select-String -Pattern 'version:\s(.+)\+' | % {Set-Item -Path Env:TOWN_VERSION -Value "$($_.matches.groups[1])"}
& 'C:/Program Files (x86)/Inno Setup 6/ISCC.exe' /DMyAppVersion=$Env:TOWN_VERSION TownSetup.iss
# flutter pub run msix:create
- name: Copy portable start script
run: |
cp scripts/start.bat build/windows/runner/Release/
- name: Archive
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -147,7 +152,9 @@ jobs:
run: flutter config --enable-linux-desktop
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: 🏭 Build nightly
if: ${{ github.ref != 'refs/tags/stable' }}
run: |
Expand All @@ -170,7 +177,7 @@ jobs:
# mv linwood-town*.rpm linwood-town-linux.rpm
- name: Build .AppImage executable
run: |
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.0-beta.1/appimage-builder-1.0.0-677acbd-x86_64.AppImage
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
appimage-builder --recipe AppImageBuilder.yml --skip-test
Expand All @@ -181,7 +188,11 @@ jobs:
cp -r linux/debian/usr/share build/linux/x64/release/bundle/usr
- name: Rename AppImage
run: |
mv ./*.AppImage* linwood-town-linux.AppImage
ls
mv ./*.AppImage linwood-town-linux.AppImage
- name: Copy portable start script
run: |
cp scripts/start.sh build/linux/x64/release/bundle
- name: Archive
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -250,7 +261,9 @@ jobs:
run: flutter config --enable-linux-desktop
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: 🏭 Build nightly
if: ${{ github.ref != 'refs/tags/stable' }}
run: |
Expand Down Expand Up @@ -292,38 +305,38 @@ jobs:
with:
name: linux-alternative-portable
path: app/build/linux/x64/release/bundle
# build-macos:
# runs-on: macos-latest
# defaults:
# run:
# working-directory: app
# steps:
# - name: ⬆️ Checkout
# uses: actions/checkout@v3
# - name: Get flutter version
# run: |
# FLUTTER_VERSION=$(cat FLUTTER_VERSION)
# echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'any'
# - name: ✅ Enable platforms
# run: flutter config --enable-macos-desktop
# - name: 📦 Get dependencies
# run: |
# flutter pub get
# - name: 🏭 Build
# run: |
# flutter clean
# flutter doctor -v
# flutter build macos -v
# - name: Archive
# uses: actions/upload-artifact@v3
# with:
# name: macos-build
# path: |
# app/build/macos/Build/Products/Release/town.app
#build-macos:
# runs-on: macos-latest
# defaults:
# run:
# working-directory: app
# steps:
# - name: ⬆️ Checkout
# uses: actions/checkout@v3
# - name: Get flutter version
# run: |
# FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
# echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: 'any'
# - name: ✅ Enable platforms
# run: flutter config --enable-macos-desktop
# - name: 📦 Get dependencies
# run: |
# flutter clean
# flutter pub get
# flutter doctor -v
# - name: 🏭 Build
# run: |
# flutter build macos -v
# - name: Archive
# uses: actions/upload-artifact@v3
# with:
# name: macos-build
# path: |
# app/build/macos/Build/Products/Release/town.app
deploy:
runs-on: ubuntu-22.04
if: github.event_name == 'push'
Expand All @@ -335,7 +348,7 @@ jobs:
- build-windows
- build-linux
- build-flatpak
# - build-macos
#- build-macos
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -386,16 +399,16 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: windows-setup
# - uses: actions/download-artifact@v3
# with:
# name: macos-build
# path: macos-build/
#- uses: actions/download-artifact@v3
# with:
# name: macos-build
# path: macos-build/
- name: 📦 Zip artifacts
run: |
zip -r linwood-town-windows.zip windows-build/*
tar -C linux-build -czf linwood-town-linux.tar.gz .
tar -C linux-alternative-portable -czf linwood-town-linux-alternative.tar.gz .
# tar -C macos-build -czf linwood-town-macos.tar.gz .
# tar -C macos-build -czf linwood-town-macos.tar.gz .
- name: Configure git
if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' }}
run: |
Expand Down Expand Up @@ -505,7 +518,7 @@ jobs:
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.2"
ruby-version: "3.2.1"
bundler-cache: true
working-directory: app/android
- name: 🚀 Deploy to Play Store
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/LinwoodCloud/projects/2
project-url: https://github.com/orgs/LinwoodCloud/projects/4
github-token: ${{ secrets.CI_PAT }}
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
with:
token: ${{ secrets.CI_PAT }}
ref: ${{ github.ref }}
fetch-depth: 0
- name: Get flutter version
run: |
FLUTTER_VERSION=$(cat FLUTTER_VERSION)
Expand Down Expand Up @@ -99,6 +100,7 @@ jobs:
- uses: actions/checkout@v3
with:
token: ${{ secrets.CI_PAT }}
fetch-depth: 0
- name: Create release
uses: softprops/action-gh-release@v1
with:
Expand Down Expand Up @@ -255,21 +257,21 @@ jobs:
webhook-url: ${{ secrets.WEBHOOK_URL }}
embed-title: ${{ env.TOWN_VERSION }}
embed-description: ${{ env.TOWN_CHANGELOG }}
embed-url: https://github.com/LinwoodCloud/Town/releases/tag/v${{ env.TOWN_VERSION }}
embed-url: https://github.com/LinwoodDev/town/releases/tag/v${{ env.TOWN_VERSION }}
content: |
Version ${{ env.TOWN_VERSION }} released!
Download it here: https://docs.town.linwood.dev/downloads
https://github.com/LinwoodCloud/Town/releases/tag/v${{ env.TOWN_VERSION }}
https://github.com/LinwoodDev/town/releases/tag/v${{ env.TOWN_VERSION }}
- name: Discord Webhook Action
uses: tsickert/[email protected]
if: ${{ github.event.inputs.stable == 'false' && github.ref == 'refs/heads/develop' }}
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
embed-title: ${{ env.TOWN_VERSION }}
embed-description: ${{ env.TOWN_CHANGELOG }}
embed-url: https://github.com/LinwoodCloud/Town/releases/tag/v${{ env.TOWN_VERSION }}
embed-url: https://github.com/LinwoodDev/town/releases/tag/v${{ env.TOWN_VERSION }}
content: |
Pre-release version ${{ env.TOWN_VERSION }} released!
Download it here: https://docs.town.linwood.dev/downloads
Please note that this is a pre-release version and is not intended for production use.
Read more about it here: https://docs.town.linwood.dev/nightly
Read more about it here: https://docs.town.linwood.dev/nightly
2 changes: 1 addition & 1 deletion FLUTTER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.8
3.7.12
3 changes: 2 additions & 1 deletion app/l10n.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
output-localization-file: app_localizations.dart
nullable-getters: false
29 changes: 0 additions & 29 deletions app/lib/colors.dart

This file was deleted.

2 changes: 1 addition & 1 deletion app/lib/cubits/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TownSettings with _$TownSettings {
@Default(ThemeMode.system) ThemeMode themeMode,
@Default(false) bool nativeTitleBar,
@Default('') String design,
}) = _TownSettings;
}) = _FlowSettings;

factory TownSettings.fromPrefs(SharedPreferences prefs) => TownSettings(
themeMode:
Expand Down
40 changes: 20 additions & 20 deletions app/lib/cubits/settings.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,23 @@ class _$TownSettingsCopyWithImpl<$Res, $Val extends TownSettings>
}

/// @nodoc
abstract class _$$_TownSettingsCopyWith<$Res>
abstract class _$$_FlowSettingsCopyWith<$Res>
implements $TownSettingsCopyWith<$Res> {
factory _$$_TownSettingsCopyWith(
_$_TownSettings value, $Res Function(_$_TownSettings) then) =
__$$_TownSettingsCopyWithImpl<$Res>;
factory _$$_FlowSettingsCopyWith(
_$_FlowSettings value, $Res Function(_$_FlowSettings) then) =
__$$_FlowSettingsCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String locale, ThemeMode themeMode, bool nativeTitleBar, String design});
}

/// @nodoc
class __$$_TownSettingsCopyWithImpl<$Res>
extends _$TownSettingsCopyWithImpl<$Res, _$_TownSettings>
implements _$$_TownSettingsCopyWith<$Res> {
__$$_TownSettingsCopyWithImpl(
_$_TownSettings _value, $Res Function(_$_TownSettings) _then)
class __$$_FlowSettingsCopyWithImpl<$Res>
extends _$TownSettingsCopyWithImpl<$Res, _$_FlowSettings>
implements _$$_FlowSettingsCopyWith<$Res> {
__$$_FlowSettingsCopyWithImpl(
_$_FlowSettings _value, $Res Function(_$_FlowSettings) _then)
: super(_value, _then);

@pragma('vm:prefer-inline')
Expand All @@ -103,7 +103,7 @@ class __$$_TownSettingsCopyWithImpl<$Res>
Object? nativeTitleBar = null,
Object? design = null,
}) {
return _then(_$_TownSettings(
return _then(_$_FlowSettings(
locale: null == locale
? _value.locale
: locale // ignore: cast_nullable_to_non_nullable
Expand All @@ -126,8 +126,8 @@ class __$$_TownSettingsCopyWithImpl<$Res>

/// @nodoc
class _$_TownSettings extends _TownSettings {
const _$_TownSettings(
class _$_FlowSettings extends _FlowSettings {
const _$_FlowSettings(
{this.locale = '',
this.themeMode = ThemeMode.system,
this.nativeTitleBar = false,
Expand Down Expand Up @@ -156,7 +156,7 @@ class _$_TownSettings extends _TownSettings {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_TownSettings &&
other is _$_FlowSettings &&
(identical(other.locale, locale) || other.locale == locale) &&
(identical(other.themeMode, themeMode) ||
other.themeMode == themeMode) &&
Expand All @@ -172,17 +172,17 @@ class _$_TownSettings extends _TownSettings {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_TownSettingsCopyWith<_$_TownSettings> get copyWith =>
__$$_TownSettingsCopyWithImpl<_$_TownSettings>(this, _$identity);
_$$_FlowSettingsCopyWith<_$_FlowSettings> get copyWith =>
__$$_FlowSettingsCopyWithImpl<_$_FlowSettings>(this, _$identity);
}

abstract class _TownSettings extends TownSettings {
const factory _TownSettings(
abstract class _FlowSettings extends TownSettings {
const factory _FlowSettings(
{final String locale,
final ThemeMode themeMode,
final bool nativeTitleBar,
final String design}) = _$_TownSettings;
const _TownSettings._() : super._();
final String design}) = _$_FlowSettings;
const _FlowSettings._() : super._();

@override
String get locale;
Expand All @@ -194,6 +194,6 @@ abstract class _TownSettings extends TownSettings {
String get design;
@override
@JsonKey(ignore: true)
_$$_TownSettingsCopyWith<_$_TownSettings> get copyWith =>
_$$_FlowSettingsCopyWith<_$_FlowSettings> get copyWith =>
throw _privateConstructorUsedError;
}
3 changes: 0 additions & 3 deletions app/lib/games/main/game.dart

This file was deleted.

Loading

0 comments on commit e511d0e

Please sign in to comment.