Skip to content

Commit 3610420

Browse files
committed
test ci
test ci test ci test ci test ci test ci test ci test ci test ci update pub update pub update gradle update readme
1 parent bc9d5cd commit 3610420

File tree

6 files changed

+281
-189
lines changed

6 files changed

+281
-189
lines changed

.github/workflows/ci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
paths-ignore:
11+
- '**/*.md'
12+
- '**/*.txt'
13+
- '**/*.png'
14+
- '**/*.jpg'
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/setup-java@v2
23+
with:
24+
distribution: 'zulu'
25+
java-version: 8
26+
- uses: subosito/flutter-action@v1
27+
with:
28+
flutter-version: '2.5.3'
29+
- uses: finnp/create-file-action@master
30+
env:
31+
FILE_NAME: lib/common/config/ignoreConfig.dart
32+
FILE_DATA: class NetConfig { static const CLIENT_ID = "${{ secrets.CLIENT_ID }}"; static const CLIENT_SECRET = "${{ secrets.CLIENT_SECRET }}";}
33+
- run: flutter pub get
34+
- run: flutter build apk --release --target-platform=android-arm64 --no-shrink
35+
36+
apk:
37+
name: Generate APK
38+
if: startsWith(github.ref, 'refs/tags/v')
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v2
43+
- name: Setup JDK
44+
uses: actions/setup-java@v2
45+
with:
46+
distribution: 'zulu'
47+
java-version: 8
48+
- uses: subosito/flutter-action@v1
49+
with:
50+
flutter-version: '2.5.3'
51+
- uses: finnp/create-file-action@master
52+
env:
53+
FILE_NAME: lib/common/config/ignoreConfig.dart
54+
FILE_DATA: class NetConfig { static const CLIENT_ID = "${{ secrets.CLIENT_ID }}"; static const CLIENT_SECRET = "${{ secrets.CLIENT_SECRET }}";}
55+
- run: flutter pub get
56+
- run: flutter build apk --release --target-platform=android-arm64 --no-shrink
57+
- name: Upload APK
58+
uses: actions/upload-artifact@v2
59+
with:
60+
name: apk
61+
path: build/app/outputs/apk/release/app-release.apk
62+
release:
63+
name: Release APK
64+
needs: apk
65+
if: startsWith(github.ref, 'refs/tags/v')
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Download APK from build
69+
uses: actions/download-artifact@v2
70+
with:
71+
name: apk
72+
- name: Display structure of downloaded files
73+
run: ls -R
74+
75+
- name: Create Release
76+
id: create_release
77+
uses: actions/[email protected]
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
with:
81+
tag_name: ${{ github.ref }}
82+
release_name: Release ${{ github.ref }}
83+
- name: Upload Release APK
84+
id: upload_release_asset
85+
uses: actions/[email protected]
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
with:
89+
upload_url: ${{ steps.create_release.outputs.upload_url }}
90+
asset_path: ./app-release.apk
91+
asset_name: app-release.apk
92+
asset_content_type: application/zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](./logo.png)
22

3-
3+
[![Github Actions](https://github.com/CarGuo/gsy_github_app_flutter/workflows/CI/badge.svg)](https://github.com/CarGuo/gsy_github_app_flutter/actions)
44
[![GitHub stars](https://img.shields.io/github/stars/CarGuo/GSYGithubAppFlutter.svg)](https://github.com/CarGuo/GSYGithubAppFlutter/stargazers)
55
[![GitHub forks](https://img.shields.io/github/forks/CarGuo/GSYGithubAppFlutter.svg)](https://github.com/CarGuo/GSYGithubAppFlutter/network)
66
[![GitHub issues](https://img.shields.io/github/issues/CarGuo/GSYGithubAppFlutter.svg)](https://github.com/CarGuo/GSYGithubAppFlutter/issues)

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:4.1.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip

0 commit comments

Comments
 (0)