From 854ce99b96fc9b43232523746c59b5c9deac6416 Mon Sep 17 00:00:00 2001 From: saikrishna321 Date: Fri, 28 Jun 2024 15:35:34 +0530 Subject: [PATCH] Build apps and attach to release --- .github/workflows/main.yml | 9 +-------- .github/workflows/publish.yml | 20 +++++++++++++++++++- server/pubspec.yaml | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a40bcae..28ab0ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,4 @@ -on: - push: - branches: - - main - pull_request: - branches: - - main - +on: [workflow_call] name: Appium Flutter Integration Server jobs: android: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bffc059..be721da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,10 @@ on: name: Publish to pub.dev jobs: + build: + uses: ./.github/workflows/main.yml # use the callable tests job to run tests publish: + needs: [ build ] permissions: id-token: write # Required for authentication using OIDC defaults: @@ -26,7 +29,22 @@ jobs: run: flutter pub get - name: Publish run: dart pub publish --force - + - uses: actions/download-artifact@v4 + with: + name: Android build + - name: Display structure of downloaded files + run: ls -R + - uses: actions/download-artifact@v4 + with: + name: ios-build + - name: Display structure of downloaded files + run: ls -R + - name: Upload Android Build to Release + uses: softprops/action-gh-release@v2 + with: + files: | + app-debug.apk + ios.zip - name: Update Flutter Driver with Version run: | TAG_NAME=$(curl -s "https://api.github.com/repos/AppiumTestDistribution/appium-flutter-server/tags" | grep -m 1 '"name"' | sed -E 's/.*"name": "([^"]+)".*/\1/') diff --git a/server/pubspec.yaml b/server/pubspec.yaml index 9e9e7aa..365dbb5 100644 --- a/server/pubspec.yaml +++ b/server/pubspec.yaml @@ -1,6 +1,6 @@ name: appium_flutter_server description: "Appium Flutter server using Integration Test package for testing Flutter apps with Appium" -version: 0.0.12 +version: 0.0.13 homepage: "https://github.com/AppiumTestDistribution/appium-flutter-server" environment: