Skip to content

Commit cf265e0

Browse files
committed
Add workflow for release
1 parent a22d5f2 commit cf265e0

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: APK Build
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
# pull_request:
11+
# branches: [ master ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
- name: Export Release Timestamp
26+
run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV
27+
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- uses: actions/checkout@v2
30+
31+
- name: Flutter action
32+
# You may pin to the exact commit or the version.
33+
# uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
34+
uses: subosito/flutter-action@v1.5.3
35+
with:
36+
# The Flutter build release channel
37+
channel: stable
38+
- name: Fetch dependencies
39+
run: flutter pub get
40+
# - name: Run Tests
41+
# run: flutter test
42+
- name: Build APK
43+
run: flutter build apk
44+
- name: Release App
45+
uses: ncipollo/release-action@v1
46+
with:
47+
tag: ${{ env.APP_VERSION }}
48+
name: ${{ env.APP_VERSION }}
49+
token: ${{ secrets.GITHUB_TOKEN }}
50+
artifacts: 'build/web/web-app.zip'

0 commit comments

Comments
 (0)