feat(yt): display red line under video thumbnails with user watch per… #224
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 workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Dart | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
submodules: recursive | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: "3.4.0" | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.22.0" | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: "17" | |
- name: setup credentials for namidaco | |
run: git config --global url.https://${{ secrets.PAT_ORG }}@github.com/namidaco/.insteadOf https://github.com/namidaco/ | |
- name: setup credentials for MSOB7YY | |
run: git config --global url.https://${{ secrets.PAT }}@github.com/MSOB7YY/.insteadOf https://github.com/MSOB7YY/ | |
- name: Git Submodule Update | |
run: git clone https://github.com/namidaco/namida-translations/ assets/language | |
- name: Setup dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter pub upgrade | |
- name: Modify applicationId | |
run: find ./ -type f -exec sed -i -e 's/com.msob7y.namida/com.msob7y.namida.snapshot/g' {} \; | |
- name: Extract version from pubspec.yaml | |
id: extract_version | |
run: | | |
VERSION=$(grep -o 'version:.*' pubspec.yaml | awk '{print $2}') | |
echo ::set-output name=version::"$VERSION" | |
- name: Create keystore | |
run: | | |
echo ${{ secrets.ANDROID_SIGNING_KEYSTORE }} | base64 --decode > android/app/keystore.jks | |
- name: Create key properties | |
run: | | |
echo ${{ secrets.ANDROID_SIGNING_KEY_PROPERTIES }} | base64 --decode > android/key.properties | |
- name: Build APK -> arm64-v8a | |
run: flutter build apk --target-platform android-arm64 --release | |
- name: Move arm64-v8a | |
run: | | |
mkdir -p build_final | |
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build_final/namida-v${{ steps.extract_version.outputs.version}}-snapshot-arm64-v8a.apk | |
- name: Build APK -> armeabi-v7a | |
run: flutter build apk --target-platform android-arm --release | |
- name: Move armeabi-v7a | |
run: | | |
mkdir -p build_final | |
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build_final/namida-v${{ steps.extract_version.outputs.version}}-snapshot-armeabi-v7a.apk | |
- name: Get the previous release date | |
continue-on-error: true | |
run: | | |
release_info=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/namidaco/namida-snapshots/releases/latest) | |
release_date=$(echo "$release_info" | jq -r '.published_at') | |
echo "PREVIOUS_RELEASE_DATE=$release_date" >> $GITHUB_ENV | |
- name: Generate Changelog | |
continue-on-error: true | |
run: | | |
git_log=$(git log --oneline --decorate --no-abbrev-commit --after="$PREVIOUS_RELEASE_DATE") | |
echo "GIT_CHANGELOG=$git_log" >> $GITHUB_ENV | |
- name: Creating Snapshot Release at namida-snapshots | |
uses: softprops/action-gh-release@v2 | |
with: | |
repository: namidaco/namida-snapshots | |
make_latest: true | |
draft: false | |
tag_name: ${{ steps.extract_version.outputs.version}} | |
body: ${{ env.GIT_CHANGELOG }} | |
files: | | |
build_final/* | |
token: ${{ secrets.SNAPSHOTS_REPO_SECRET }} | |
- name: Upload all APKs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: all-apks | |
path: build_final/** |