This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
increase version to 0.2.5 #397
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
name: CI | |
on: | |
push: | |
tags: ['v*'] | |
branches: [master] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- run: sudo apt install -y libsqlite3-dev libjsoncpp-dev libsecret-1-dev libgtk-3-dev pkg-config clang ninja-build cmake | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: "3.7.x" | |
channel: "stable" | |
- run: flutter pub get | |
- run: flutter packages pub run build_runner build | |
- run: wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage | |
- run: chmod +x appimage-builder-x86_64.AppImage | |
- run: ./appimage-builder-x86_64.AppImage --skip-tests | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: photoprism-appimage | |
path: PhotoPrism-latest-x86_64.AppImage | |
build: | |
services: | |
photoprism: | |
image: thielepaul/photoprism:db-api-demo | |
ports: | |
- 2342:2342 | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt install libsqlite3-dev | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: "11" | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: "3.7.x" | |
channel: "stable" | |
- run: flutter pub get | |
- run: flutter format --dry-run --set-exit-if-changed lib | |
- run: flutter packages pub run build_runner build | |
- run: flutter analyze --pub | |
- run: flutter test --coverage | |
- uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage/lcov.info | |
- env: | |
KEY_JKS: ${{ secrets.KEY_JKS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: echo "$KEY_JKS" | base64 -d > key.jks && flutter build apk --pub --flavor prod --no-shrink | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: photoprism-apk | |
path: build/app/outputs/apk/prod/release/ | |
release-master: | |
needs: | |
- build | |
- build-linux | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: photoprism-apk | |
- run: mv photoprism-apk/app-prod-release.apk photoprism.apk | |
- uses: actions/download-artifact@v1 | |
with: | |
name: photoprism-appimage | |
- run: mv photoprism-appimage/PhotoPrism-latest-x86_64.AppImage photoprism.AppImage | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest-db-api" | |
prerelease: true | |
title: "Development CI Build (DB API)" | |
files: | | |
photoprism.apk | |
photoprism.AppImage | |
release-tag: | |
needs: | |
- build | |
- build-linux | |
runs-on: ubuntu-latest | |
if: github.ref != 'refs/heads/master' | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: photoprism-apk | |
- run: mv photoprism-apk/app-prod-release.apk photoprism.apk | |
- uses: actions/download-artifact@v1 | |
with: | |
name: photoprism-appimage | |
- run: mv photoprism-appimage/PhotoPrism-latest-x86_64.AppImage photoprism.AppImage | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
photoprism.apk | |
photoprism.AppImage |