-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from XPEHO/feat/release
feat(release): create release workflow
- Loading branch information
Showing
4 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: RELEASE | ||
on: | ||
workflow_dispatch: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# This workflow contains a single job called "build" | ||
release: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Configure signature | ||
run: | | ||
echo "${{secrets.KEY_PROPERTIES}}" > android/key.properties | ||
echo "${{secrets.RELEASE_KEYSTORE}}" > upload-keystore.encoded | ||
base64 -d -i upload-keystore.encoded > ./android/app/upload-keystore.jks | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '12.x' | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
flutter-version: '2.0.5' | ||
- name: Build apk | ||
run: | | ||
flutter pub get | ||
flutter format --set-exit-if-changed . | ||
flutter analyze | ||
flutter test | ||
flutter build apk | ||
- name: Retrieve Release Version | ||
id: versionstep | ||
run: | | ||
VERSION=$(more pubspec.yaml | grep version: | cut -d ' ' -f2) | ||
echo "::set-output name=VERSION::$VERSION" | ||
- name: Upload the APK onto Github | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: 'build/app/outputs/flutter-apk/*.apk' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.versionstep.outputs.VERSION }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,4 @@ app.*.map.json | |
/android/app/debug | ||
/android/app/profile | ||
/android/app/release | ||
/android/key.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters