From 6c8b74c9fcf2e7e055ebfd5a32f6e1a70b55c70d Mon Sep 17 00:00:00 2001 From: Youssef Raafat Date: Wed, 2 Nov 2022 12:29:11 +0200 Subject: [PATCH 1/2] Merge GH and Pub Release Jobs --- .circleci/config.yml | 59 +++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 210e498f3..5b15a3bac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,25 +118,33 @@ jobs: command: flutter pub run pana --no-warning --exit-code-threshold 0 - run: flutter pub publish --dry-run - pub_release: - docker: - - image: cirrusci/flutter - steps: - - checkout - - run: chmod +x ./release.sh - - run: ./release.sh - - gh_ibg_release: + release: macos: - xcode: "13.4.1" + xcode: 13.4.1 working_directory: "~" steps: - checkout: path: ~/project - - run: git clone https://InstabugCI:$RELEASE_GITHUB_TOKEN@github.com/Instabug/Escape.git - - run: cd Escape && swift build -c release - - run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape - - run: cd project && Escape flutter publish + - flutter/install_sdk_and_pub: + flutter_version: 3.3.6 + app-dir: project + - run: + name: Generate Pigeons + working_directory: project + command: sh ./scripts/pigeon.sh + - run: + name: Clone Escape + command: git clone git@github.com:Instabug/Escape.git + - run: + name: Build Escape + working_directory: Escape + command: | + swift build -c release + cp -f .build/release/Escape /usr/local/bin/escape + - run: + name: Publish Package + working_directory: project + command: Escape flutter publish workflows: version: 2 @@ -153,24 +161,7 @@ workflows: - verify_pub: requires: - lint_flutter - - hold_pub_release: - type: approval - requires: - - flutter_tests - - flutter_tests_2-10-5 - - test_android - - ios_tests - - verify_pub - filters: - branches: - only: master - - pub_release: - requires: - - hold_pub_release - filters: - branches: - only: master - - hold_gh_ibg_release: + - hold_release: type: approval requires: - flutter_tests @@ -181,9 +172,9 @@ workflows: filters: branches: only: master - - gh_ibg_release: + - release: requires: - - hold_gh_ibg_release + - hold_release filters: branches: only: master From 10f5ff69dd844340833aafd758d0d07100e565b5 Mon Sep 17 00:00:00 2001 From: Youssef Raafat Date: Wed, 2 Nov 2022 12:30:07 +0200 Subject: [PATCH 2/2] Delete `release.sh` --- release.sh | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 release.sh diff --git a/release.sh b/release.sh deleted file mode 100644 index 722636cea..000000000 --- a/release.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -VERSION=$(egrep -o "version: ([0-9]-*.*)+[0-9]" pubspec.yaml | cut -d ":" -f 2) -if [ ! "${VERSION}" ] || [ -z "${VERSION}" ];then - echo "Instabug: err: Version Number not found." - exit 1 -else - mkdir -p .pub-cache - cat < $HOME/.pub-cache/credentials.json - { - "accessToken":"${ACCESS_TOKEN}", - "refreshToken":"${REFRESH_TOKEN}", - "tokenEndpoint":"https://accounts.google.com/o/oauth2/token", - "scopes":["https://www.googleapis.com/auth/userinfo.email","openid"], - "expiration":${EXPIRATION} - } -EOF - flutter pub get - sh ./scripts/pigeon.sh - flutter packages pub publish -f -fi \ No newline at end of file