Updated GitHub actions
This commit is contained in:
parent
9a7d076a8e
commit
ce09aec253
|
|
@ -2,6 +2,10 @@ name: Build app
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
obfuscate:
|
||||||
|
description: Obfuscate
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
buildAndroid:
|
buildAndroid:
|
||||||
description: Build for Android
|
description: Build for Android
|
||||||
required: true
|
required: true
|
||||||
|
|
@ -22,11 +26,18 @@ jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Linting
|
name: Linting
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
result: ${{ steps.version.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: 3.22.1
|
flutter-version: 3.24.5
|
||||||
|
- name: Get flutter version
|
||||||
|
id: version
|
||||||
|
uses: mikefarah/yq@master
|
||||||
|
with:
|
||||||
|
cmd: yq -r '.version' 'pubspec.yaml' | awk -F'+' '{print $1}'
|
||||||
- name: Disabling flutter analytics
|
- name: Disabling flutter analytics
|
||||||
run: flutter config --no-analytics
|
run: flutter config --no-analytics
|
||||||
- name: Analyzing project code
|
- name: Analyzing project code
|
||||||
|
|
@ -40,7 +51,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: 3.22.1
|
flutter-version: 3.24.5
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: "adopt"
|
distribution: "adopt"
|
||||||
|
|
@ -51,22 +62,24 @@ jobs:
|
||||||
echo "${{ secrets.ANDROID_KEYSTORE }}" > ./android/app/upload-keystore.jks.asc
|
echo "${{ secrets.ANDROID_KEYSTORE }}" > ./android/app/upload-keystore.jks.asc
|
||||||
gpg -d --passphrase "${{ secrets.ANDROID_KEYSTORE_PASSPHRASE }}" --batch ./android/app/upload-keystore.jks.asc > ./android/app/upload-keystore.jks
|
gpg -d --passphrase "${{ secrets.ANDROID_KEYSTORE_PASSPHRASE }}" --batch ./android/app/upload-keystore.jks.asc > ./android/app/upload-keystore.jks
|
||||||
- name: Get flutter version
|
- name: Get flutter version
|
||||||
id: get_flutter_version
|
id: version
|
||||||
uses: its404/get-flutter-version@v1.0.0
|
uses: mikefarah/yq@master
|
||||||
|
with:
|
||||||
|
cmd: yq -r '.version' 'pubspec.yaml'
|
||||||
- name: Disabling flutter analytics
|
- name: Disabling flutter analytics
|
||||||
run: flutter config --no-analytics
|
run: flutter config --no-analytics
|
||||||
- name: Running build
|
- name: Running build
|
||||||
id: compile
|
id: compile
|
||||||
run: flutter build apk --obfuscate --split-debug-info=build/debugAndroid
|
run: flutter build apk --split-debug-info=build/debugAndroid ${{ github.event.inputs.obfuscate == 'true' && '--obfuscate' || '' }}
|
||||||
- name: Preparing files
|
- name: Preparing files
|
||||||
run: |
|
run: |
|
||||||
cp build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/ollama-android-v${{ steps.get_flutter_version.outputs.version_number }}.apk
|
cp build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/ollama-android-v${{ needs.analyze.outputs.result }}.apk
|
||||||
- name: Uploading APK
|
- name: Uploading APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ollama-android
|
name: ollama-android
|
||||||
path: |
|
path: |
|
||||||
build/app/outputs/flutter-apk/ollama-android-v${{ steps.get_flutter_version.outputs.version_number }}.apk
|
build/app/outputs/flutter-apk/ollama-android-v${{ needs.analyze.outputs.result }}.apk
|
||||||
build-windows-x64:
|
build-windows-x64:
|
||||||
name: Building for Windows x64
|
name: Building for Windows x64
|
||||||
if: ${{ github.event.inputs.buildWindowsX64 == 'true' }}
|
if: ${{ github.event.inputs.buildWindowsX64 == 'true' }}
|
||||||
|
|
@ -76,25 +89,27 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: 3.22.1
|
flutter-version: 3.24.5
|
||||||
- name: Get flutter version
|
- name: Get flutter version
|
||||||
id: get_flutter_version
|
id: version
|
||||||
uses: its404/get-flutter-version@v1.0.0
|
uses: mikefarah/yq@master
|
||||||
|
with:
|
||||||
|
cmd: yq -r '.version' 'pubspec.yaml'
|
||||||
- name: Disabling flutter analytics
|
- name: Disabling flutter analytics
|
||||||
run: flutter config --no-analytics
|
run: flutter config --no-analytics
|
||||||
- name: Running build
|
- name: Running build
|
||||||
id: compile
|
id: compile
|
||||||
run: flutter build windows --obfuscate --split-debug-info=build\debugWindows
|
run: flutter build windows --split-debug-info=build\debugWindows ${{ github.event.inputs.obfuscate == 'true' && '--obfuscate' || '' }}
|
||||||
- name: Running installer build
|
- name: Running installer build
|
||||||
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
|
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
|
||||||
with:
|
with:
|
||||||
path: .\windows_installer\ollama.iss
|
path: .\windows_installer\ollama.iss
|
||||||
options: /O+ /dAppVersion=${{ steps.get_flutter_version.outputs.version_number }}
|
options: /O+ /dAppVersion=${{ needs.analyze.outputs.result }}
|
||||||
- name: Uploading installer
|
- name: Uploading installer
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ollama-windows-x64
|
name: ollama-windows-x64
|
||||||
path: build\windows\x64\runner\ollama-windows-x64-v${{ steps.get_flutter_version.outputs.version_number }}.exe
|
path: build\windows\x64\runner\ollama-windows-x64-v${{ needs.analyze.outputs.result }}.exe
|
||||||
build-linux-x64:
|
build-linux-x64:
|
||||||
name: Building for Linux x64
|
name: Building for Linux x64
|
||||||
if: ${{ github.event.inputs.buildLinuxX64 == 'true' }}
|
if: ${{ github.event.inputs.buildLinuxX64 == 'true' }}
|
||||||
|
|
@ -104,28 +119,30 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: 3.22.1
|
flutter-version: 3.24.5
|
||||||
- name: Get flutter version
|
- name: Get flutter version
|
||||||
id: get_flutter_version
|
id: version
|
||||||
uses: its404/get-flutter-version@v1.0.0
|
uses: mikefarah/yq@master
|
||||||
|
with:
|
||||||
|
cmd: yq -r '.version' 'pubspec.yaml'
|
||||||
- name: Disabling flutter analytics
|
- name: Disabling flutter analytics
|
||||||
run: flutter config --no-analytics
|
run: flutter config --no-analytics
|
||||||
- name: Installing linux dependencies
|
- name: Installing linux dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install ninja-build
|
sudo apt-get update -y
|
||||||
sudo apt-get install build-essential libgtk-3-dev
|
sudo apt-get install -y ninja-build libgtk-3-dev
|
||||||
- name: Running build
|
- name: Running build
|
||||||
id: compile
|
id: compile
|
||||||
run: flutter build linux --obfuscate --split-debug-info=build/debugLinux
|
run: flutter build linux --split-debug-info=build/debugLinux ${{ github.event.inputs.obfuscate == 'true' && '--obfuscate' || '' }}
|
||||||
- name: Creating archive
|
- name: Creating archive
|
||||||
run: |
|
run: |
|
||||||
cd build/linux/x64/release/bundle
|
cd build/linux/x64/release/bundle
|
||||||
tar -czf ollama-linux-x64-v${{ steps.get_flutter_version.outputs.version_number }}.tar.gz *
|
tar -czf ollama-linux-x64-v${{ needs.analyze.outputs.result }}.tar.gz *
|
||||||
- name: Uploading archive
|
- name: Uploading archive
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ollama-linux-x64
|
name: ollama-linux-x64
|
||||||
path: build/linux/x64/release/bundle/ollama-linux-x64-v${{ steps.get_flutter_version.outputs.version_number }}.tar.gz
|
path: build/linux/x64/release/bundle/ollama-linux-x64-v${{ needs.analyze.outputs.result }}.tar.gz
|
||||||
bundle:
|
bundle:
|
||||||
name: Creating bundle
|
name: Creating bundle
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
name: Close inactive issues
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "30 1 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
close-issues:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v5
|
|
||||||
with:
|
|
||||||
days-before-stale: -1
|
|
||||||
days-before-pr-close: -1
|
|
||||||
days-before-issue-close: 21
|
|
||||||
close-issue-message: "This issue was closed because it has been inactive for 21 days. Reopen it or create a new issue in case the problem still persists."
|
|
||||||
Loading…
Reference in New Issue