Skip to content

Commit

Permalink
build: github ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
ravindranag committed Apr 21, 2023
1 parent 8610532 commit 6d039fb
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/build_and_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build and Release

on:
push:
branches:
- main

permissions:
contents: write
discussions: write

jobs:
greet:
runs-on: ubuntu-latest

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

- name: setup java
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'

- name: setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.10'
channel: 'stable'

- name: setup environment
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
run: |
echo $KEYSTORE | base64 --decode > android/keystore.jks
echo $KEY_PROPERTIES | base64 --decode > android/key.properties
echo $GOOGLE_SERVICES | base64 --decode > android/app/google-services.json
- name: generate changelog
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude_types: other,doc,chore

- name: build apk
run: |
flutter build apk
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/attend-75-${{github.ref_name}}.apk
# - name: create github release
# uses: softprops/action-gh-release@v1
# with:
# body: ${{ steps.changelog.outputs.changes }}
# files: |
# build/app/outputs/flutter-apk/attend-75-${{github.ref_name}}.apk
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
version: 1.1.0+1

environment:
sdk: '>=2.19.6 <3.0.0'
Expand Down

0 comments on commit 6d039fb

Please sign in to comment.