Skip to content

Commit d1c27b6

Browse files
committed
Initial commit.
0 parents  commit d1c27b6

13 files changed

+2477
-0
lines changed

.github/workflows/main.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on: [push, pull_request]
2+
3+
name: Flutter App Template
4+
5+
jobs:
6+
main:
7+
name: Build and test
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout sources
11+
uses: actions/checkout@v1
12+
13+
- name: Install xcb shapes and xfixes
14+
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev
15+
16+
- name: Install stable toolchain
17+
uses: actions-rs/toolchain@v1
18+
with:
19+
profile: minimal
20+
toolchain: stable
21+
override: true
22+
components: rustfmt, clippy
23+
24+
- name: Install flutter
25+
uses: subosito/flutter-action@v1
26+
with:
27+
channel: 'stable'
28+
29+
- name: Install cargo-flutter
30+
uses: actions-rs/cargo@v1
31+
with:
32+
command: install
33+
args: cargo-flutter
34+
35+
- name: Run cargo test
36+
uses: actions-rs/cargo@v1
37+
with:
38+
command: flutter
39+
args: test
40+
41+
- name: Run cargo fmt
42+
uses: actions-rs/cargo@v1
43+
with:
44+
command: fmt
45+
args: --all -- --check
46+
47+
#- name: Run cargo clippy
48+
# uses: actions-rs/cargo@v1
49+
# with:
50+
# command: clippy
51+
# args: -- -D warnings

.github/workflows/release.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
name: Flutter App Template Release
7+
8+
jobs:
9+
main:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout sources
14+
uses: actions/checkout@v1
15+
16+
- name: Install xcb shapes and xfixes
17+
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev
18+
19+
- name: Install stable toolchain
20+
uses: actions-rs/toolchain@v1
21+
with:
22+
profile: minimal
23+
toolchain: stable
24+
override: true
25+
26+
- name: Install flutter
27+
uses: subosito/flutter-action@v1
28+
with:
29+
channel: 'stable'
30+
31+
- name: Install appimagetool
32+
run: |
33+
wget https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage
34+
chmod +x appimagetool-x86_64.AppImage
35+
sudo mv appimagetool-x86_64.AppImage /usr/bin/appimagetool
36+
37+
- name: Install cargo-flutter
38+
uses: actions-rs/cargo@v1
39+
with:
40+
command: install
41+
args: cargo-flutter
42+
43+
- name: Run cargo-flutter
44+
uses: actions-rs/cargo@v1
45+
with:
46+
command: flutter
47+
args: --format appimage --no-sign build --release
48+
49+
- name: Create release
50+
uses: actions/create-release@v1
51+
id: create-release
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
tag_name: v_${{ github.sha }}
56+
release_name: Release v_${{ github.sha }}
57+
body: Flutter App Template
58+
59+
- name: Upload release asset
60+
uses: actions/[email protected]
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
upload_url: ${{ steps.create-release.outputs.upload_url }}
65+
asset_path: './target/flutter/release/flutter-app-template-x86_64.AppImage'
66+
asset_name: 'flutter-app-template-x86_64.AppImage'
67+
asset_content_type: application/octet-stream

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/target
2+
**/*.rs.bk
3+
/build
4+
/.dart_tool
5+
.packages

0 commit comments

Comments
 (0)