Skip to content

Commit

Permalink
feat: github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ethicnology committed Oct 26, 2023
1 parent 37b0ec2 commit 1c2f849
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 57 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/crossplatform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: flutter
on: [push]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter config --enable-linux-desktop
- run: flutter build linux
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: linux_64
path: build/linux/x64/release/bundle/

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'beta'
- run: flutter config --enable-windows-desktop
- run: flutter build windows

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- run: flutter config --enable-macos-desktop
- run: flutter build macos
12 changes: 6 additions & 6 deletions lib/widgets/add_torrent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:convert';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:freeleech/freeleech.dart';
// import 'package:freeleech/freeleech.dart';
import 'package:magneto/models/global.dart';
import 'package:provider/provider.dart';

Expand Down Expand Up @@ -111,11 +111,11 @@ class _EditTorrentState extends State<AddTorrent> {
print(e);
}
}
var ids = [
for (var t in addedTorrents)
if (t.$2.isNotEmpty) t.$2
];
if (isLeech) freeleech(global.transmission, ids);
// var ids = [
// for (var t in addedTorrents)
// if (t.$2.isNotEmpty) t.$2
// ];
// if (isLeech) freeleech(global.transmission, ids);
setState(() {});
}
},
Expand Down
7 changes: 0 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
freeleech:
dependency: "direct main"
description:
path: "../freeleech"
relative: true
source: path
version: "1.0.0"
http_parser:
dependency: transitive
description:
Expand Down
46 changes: 2 additions & 44 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,15 @@ version: 1.0.0+1
environment:
sdk: '>=3.1.0 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
transmission:
git:
url: https://github.com/ethicnology/dart-transmission
ref: main
freeleech:
path: ../freeleech
# freeleech:
# path: ../freeleech
shared_preferences: ^2.2.1
file_picker: ^5.5.0
percent_indicator: ^4.2.3
Expand All @@ -45,52 +39,16 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
assets:
- assets/communities.svg
- assets/clock_loader_40.svg

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

0 comments on commit 1c2f849

Please sign in to comment.