feature/ci-deploy #1

Merged
remoll merged 19 commits from feature/ci-deploy into main 2024-05-04 15:33:39 +00:00
3 changed files with 75 additions and 9 deletions

25
.drone.yml Normal file
View File

@ -0,0 +1,25 @@
kind: pipeline
type: kubernetes
name: build-apk
clone:
depth: 1
steps:
- name: build
image: cirrusci/flutter:stable
pull: true
commands:
- flutter packages get
- flutter build apk --release --split-per-abi
- mkdir apks
- mv build/app/outputs/apk/*/*/*.apk apks
- name: Publish APK
image: plugins/gitea-release
settings:
api_key:
from_secret: GITEA_TOKEN
trigger:
event:
- push

View File

@ -5,18 +5,38 @@ jobs:
name: Build APK name: Build APK
runs-on: k8s runs-on: k8s
steps: steps:
- uses: https://github.com/actions/checkout@v1
- uses: https://github.com/actions/setup-java@v1 - name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y xz-utils unzip
- uses: https://gitea.com/actions/checkout@v4
- uses: https://github.com/actions/setup-java@v4
with: with:
java-version: '12.x' java-version: '17'
- uses: https://github.com/subosito/flutter-action@v1 distribution: 'zulu'
- uses: https://github.com/subosito/flutter-action@v2
with: with:
flutter-version: '1.7.8+hotfix.4' channel: stable
flutter-version: 3.19.6
cache: true
- name: Setup Android SDK
uses: https://github.com/android-actions/setup-android@v3
- run: flutter pub get - run: flutter pub get
# - run: flutter test # - run: flutter test
- run: flutter build apk --debug --split-per-abi - run: flutter build apk --debug --split-per-abi
- name: Push APK to Releases
uses: https://github.com/ncipollo/release-action@v1 - name: Release APK
uses: https://gitea.com/akkuman/gitea-release-action@v1
with: with:
artifacts: "build/app/outputs/apk/debug/*.apk" files: build/app/outputs/flutter-apk/*.apk
token: ${{ secrets.TOKEN }} tag: testing
release_name: Testing release
release_body: "This is a testing release."
prerelease: true
token: ${{ secrets.GITEA_TOKEN }}
env:
NODE_OPTIONS: '--experimental-fetch'

View File

@ -0,0 +1,21 @@
on: push
name: Test, Build and Release web
jobs:
build:
name: Build Web
runs-on: k8s
steps:
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y xz-utils
- uses: actions/checkout@v4
- uses: https://github.com/subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.19.6
cache: true
- run: flutter pub get
# - run: flutter test