Skip to content

Commit

Permalink
Create workflows for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Apr 15, 2022
1 parent 09ab46a commit 5631e87
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 7 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Deploy site

on:
push:
branches: [ stable ]

workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: 'beta'
run: flutter --version

- name: Build Web
run: |
flutter config --enable-web
flutter pub get
flutter build web
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build/web
58 changes: 58 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Release app

on:
push:
branches: [ stable ]

workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: 'beta'
run: flutter --version

- name: Build Windows
run: |
flutter config --enable-windows-desktop
flutter pub get
flutter build windows
- name: Create zip
run: |
7z -tZip a exec\ExCode.zip build\windows\runner\Release\
- name : Build Android
run : |
flutter build apk
flutter build appbundle
- name : Move build files
run : |
mv build/app/outputs/flutter-apk/app-release.apk exec/excode.apk
mv build/app/outputs/bundle/release/app-release.aab exec/excode.aab
- name: Create release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
name: ExCode
tag_name: v0.0.1
prerelease: true
generate_release_notes: true
files: exec/*
body_path: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_REPOSITORY: dhzdhd/ExCode
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

## 0.0.1 / 15-04-2022

### Added

- Initial release for Android, Windows and the web
- Basic editor functionality
- Execution support for 3 languages
- Dark and Light themes
5 changes: 2 additions & 3 deletions lib/src/home/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:flutter_highlight/themes/nord.dart';
import 'package:highlight/languages/all.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:multi_split_view/multi_split_view.dart';
import 'package:resizable_widget/resizable_widget.dart';

class EditorWidget extends StatefulWidget {
const EditorWidget({Key? key}) : super(key: key);
Expand Down Expand Up @@ -92,10 +91,10 @@ class _CodeFieldWidget extends ConsumerWidget {
expands: true,
),
),
Container(
SizedBox(
height: 20,
child: Row(
children: [TextButton(onPressed: () {}, child: Text('TAB'))],
children: [TextButton(onPressed: () {}, child: const Text('TAB'))],
),
)
],
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.9.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -268,4 +268,4 @@ packages:
version: "2.1.2"
sdks:
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.12.0-4.2.pre"
flutter: ">=2.13.0-0.1.pre"
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: excode
description: A new Flutter project.

# Prevent accidental publishing to pub.dev.
publish_to: 'none'

version: 1.0.0+1

environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ^2.12.0-4.2.pre
flutter: ^2.13.0-0.1.pre

dependencies:
flutter:
Expand Down

0 comments on commit 5631e87

Please sign in to comment.