Skip to content

Add CI github action #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflow/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# This is a basic workflow to help you get started with Actions
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request
# events but only for the main branch
push:
branches: [main]
paths-ignore:
- '**/README.md'
pull_request:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: dart --version
- run: flutter --version
- run: flutter analyze
- name: Build (Linux)
run: |
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
flutter config --enable-linux-desktop
cd example
flutter create --platforms=linux .
flutter build linux
if: matrix.os == 'ubuntu-latest'
- name: Build (Mac)
run: |
flutter config --enable-macos-desktop
cd example
flutter create --platforms=macos .
flutter doctor
flutter build macos
if: matrix.os == 'macos-latest'
- name: Build (Windows)
run: |
flutter config --enable-windows-desktop
cd example
flutter create --platforms=windows .
flutter doctor
flutter build windows
if: matrix.os == 'windows-latest'
53 changes: 53 additions & 0 deletions .github/workflow/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base

#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
push:
pull_request:
branches: [main]

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflow/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish plugin

on:
release:
types: [published]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Publish
uses: sakebook/[email protected]
with:
credential: ${{ secrets.CREDENTIAL_JSON }}
flutter_package: false
skip_test: true
dry_run: true
51 changes: 29 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Libadwaita ❤️ Flutter
# Libadwaita ❤️ Flutter

![CI](https://github.com/gtk-flutter/libadwaita/actions/workflows/ci.yml/badge.svg)
[![GitHub Super-Linter](https://github.com/gtk-flutter/adwaita/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)

[![Pub.dev](https://img.shields.io/pub/v/libadwaita.svg)](https://pub.dev/packages/libadwaita)
[![License](https://img.shields.io/github/license/gtk-flutter/libadwaita?color=indigo)](LICENSE)
Expand All @@ -10,54 +13,58 @@ Unofficial implementation of Libadwaita Widgets in Flutter.

**NOTE:** For getting colors from gtk 3.0 theme use version [`<=0.9.8+1`](https://pub.dev/packages/gtk/versions/0.9.8+1)

### Features
## Features

- Various Libadwaita widgets ported to flutter
- Some new widgets are also available, Check example for more info
- Compatible with [various packages](#additional-information)

### Usage
## Usage

- This only provides widgets, for theming you should consider [adwaita](https://pub.dev/packages/adwaita) or [yaru](https://github.com/ubuntu/yaru.dart) package.
- If you want custom titlebar then you can follow the steps for that on [`bitsdojo_window`](https://pub.dev/packages/bitsdojo_window) package.
- Following Widgets are currently ported to flutter, for more info visit [libadwaita documentation](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/index.html#classes):
- [`AdwActionRow`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ActionRow.html)
- [`AdwClamp`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Clamp.html)
- [`AdwComboRow`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ComboRow.html)
- [`AdwFlap`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Flap.html)
- [`AdwHeaderBar`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.HeaderBar.html) - use `.minimal` for using it without [`window_decorations`](https://pub.dev/packages/window_decorations) package.
- `AdwHeaderButton` - A Header button to be used with `AdwHeaderBar*`
- `AdwPopupMenu` - A Popup Menu button
- [`AdwPreferencesGroup`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PreferencesGroup.html)
- `AdwScaffold`
- `AdwStackSidebar` - GtkStackSidebar renamed to match the flow
- `AdwSidebar` - To be used with `AdwStackSidebar` or `AdwFlap`
- `AdwTextButton`
- `AdwTextField`
- [`AdwViewStack`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewStack.html)
- [`AdwViewSwitcher`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcher.html)
- `AdwViewSwitcherTab` - Tabs for AdwViewSwitcher

- [`AdwActionRow`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ActionRow.html)
- [`AdwClamp`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Clamp.html)
- [`AdwComboRow`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ComboRow.html)
- [`AdwFlap`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Flap.html)
- [`AdwHeaderBar`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.HeaderBar.html) - use `.minimal` for using it without [`window_decorations`](https://pub.dev/packages/window_decorations) package.
- `AdwHeaderButton` - A Header button to be used with `AdwHeaderBar*`
- `AdwPopupMenu` - A Popup Menu button
- [`AdwPreferencesGroup`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.PreferencesGroup.html)
- `AdwScaffold`
- `AdwStackSidebar` - GtkStackSidebar renamed to match the flow
- `AdwSidebar` - To be used with `AdwStackSidebar` or `AdwFlap`
- `AdwTextButton`
- `AdwTextField`
- [`AdwViewStack`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewStack.html)
- [`AdwViewSwitcher`](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ViewSwitcher.html)
- `AdwViewSwitcherTab` - Tabs for AdwViewSwitcher

See the example app in the `example` folder for more info.

### Additional information
## Additional information

This package is dependent on

- [adwaita](https://pub.dev/packages/adwaita) or [yaru](https://github.com/ubuntu/yaru.dart) - For theming
- [`popover`](https://pub.dev/packages/popover) for `AdwPopupMenu`.
- [`window_decorations`](https://pub.dev/packages/window_decorations) for Window Decorations (not needed if you use `AdwHeaderBarMinimal`)

Optional packages to use with this package:

- [`adwaita_icons`](https://pub.dev/packages/adwaita_icons) for Adwaita Icons
- [`bitsdojo_window`](https://pub.dev/packages/bitsdojo_window) for better look and feel with custom AdwHeaderBar.bitsdojo
- [`nativeshell`](https://pub.dev/packages/nativeshell) for better look and feel with custom AdwHeaderBar.nativeshell

[Classic API Docs](https://pub.dev/documentation/libadwaita/latest/)

### License
## License

`LGPL v3 / GNU LESSER GENERAL PUBLIC LICENSE v3`

TLDR;

- You are free to use [this](https://pub.dev/packages/libadwaita) package in whatever app you want,
- If you improve the package then you should submit your patches / improvements to [this](https://github.com/prateekmedia/gtk-flutter) repository.
- If you improve the package then you should submit your patches / improvements to [this](https://github.com/gtk-flutter/libadwaita) repository.