update version (github channel) #58
Workflow file for this run
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
on: | |
push: | |
tags: | |
- "v*" | |
name: Build and Release apk | |
jobs: | |
build: | |
name: Build APK | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set version | |
id: version | |
run: | | |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g") | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Create Sentry | |
env: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
run: | | |
echo $SENTRY_DSN | base64 -d > assets/config/sentry | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: temurin | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '3.13.8' | |
- run: flutter doctor -v | |
- run: flutter pub get | |
- name: Create the Keystore | |
env: | |
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} | |
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | |
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }} | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: | | |
# import keystore from secrets | |
echo $KEYSTORE_BASE64 | base64 -d > android/app/upload-keystore.jks | |
echo $KEY_PROPERTIES | base64 -d > android/key.properties | |
echo $FIREBASE_OPTIONS | base64 -d > lib/firebase_options.dart | |
echo $GOOGLE_SERVICES_JSON | base64 -d > android/app/google-services.json | |
- run: flutter build apk | |
- run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/ConningTower-${{ steps.version.outputs.version }}-release.apk | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
artifacts: "build/app/outputs/flutter-apk/*release.apk" | |
token: ${{ secrets.ACTIONS_TOKEN }} | |
- name: Telegram Message Notify | |
uses: appleboy/[email protected] | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
New Release is update: | |
https://github.com/andychucs/conning_tower/releases/tag/${{ steps.version.outputs.version }} |