Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvc94ch committed Jan 2, 2020
0 parents commit d1c27b6
Show file tree
Hide file tree
Showing 13 changed files with 2,477 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on: [push, pull_request]

name: Flutter App Template

jobs:
main:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install xcb shapes and xfixes
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Install flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'

- name: Install cargo-flutter
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-flutter

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: flutter
args: test

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

#- name: Run cargo clippy
# uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: -- -D warnings
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
on:
push:
branches:
- master

name: Flutter App Template Release

jobs:
main:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v1

- name: Install xcb shapes and xfixes
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'

- name: Install appimagetool
run: |
wget https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
sudo mv appimagetool-x86_64.AppImage /usr/bin/appimagetool
- name: Install cargo-flutter
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-flutter

- name: Run cargo-flutter
uses: actions-rs/cargo@v1
with:
command: flutter
args: --format appimage --no-sign build --release

- name: Create release
uses: actions/create-release@v1
id: create-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v_${{ github.sha }}
release_name: Release v_${{ github.sha }}
body: Flutter App Template

- name: Upload release asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: './target/flutter/release/flutter-app-template-x86_64.AppImage'
asset_name: 'flutter-app-template-x86_64.AppImage'
asset_content_type: application/octet-stream
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/target
**/*.rs.bk
/build
/.dart_tool
.packages
Loading

0 comments on commit d1c27b6

Please sign in to comment.