From 6c4ee128e575597ba5ad84e8b767bed5ef345785 Mon Sep 17 00:00:00 2001 From: Alexander Osokin Date: Mon, 5 Apr 2021 19:29:21 +0300 Subject: [PATCH 1/6] Linguist config and remove artifacts --- .gitattributes | 2 ++ TangemSdk/TangemSdk/Crypto/podssworkaround.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitattributes delete mode 100644 TangemSdk/TangemSdk/Crypto/podssworkaround.h diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..ca1324eb0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +fastlane/* linguist-vendored +TangemSdk/TangemSdk/Crypto/secp256k1/* linguist-vendored \ No newline at end of file diff --git a/TangemSdk/TangemSdk/Crypto/podssworkaround.h b/TangemSdk/TangemSdk/Crypto/podssworkaround.h deleted file mode 100644 index 8b1378917..000000000 --- a/TangemSdk/TangemSdk/Crypto/podssworkaround.h +++ /dev/null @@ -1 +0,0 @@ - From e0f4f53194f5170c7aa4393656a06087695ff15d Mon Sep 17 00:00:00 2001 From: Andrey Lazutkin Date: Mon, 5 Apr 2021 19:46:59 +0300 Subject: [PATCH 2/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f84d23c6..4086ac083 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ [![Version](https://img.shields.io/cocoapods/v/TangemSdk.svg?style=flat)](https://cocoapods.org/pods/TangemSdk) [![License](https://img.shields.io/cocoapods/l/TangemSdk.svg?style=flat)](https://cocoapods.org/pods/TangemSdk) [![Platform](https://img.shields.io/cocoapods/p/TangemSdk.svg?style=flat)](https://cocoapods.org/pods/TangemSdk) -[![Beta](https://img.shields.io/badge/-beta-red)]() # Welcome to Tangem @@ -28,6 +27,7 @@ The Tangem card is a self-custodial hardware wallet for blockchain assets. The m ### Requirements iOS 13+ (CoreNFC is required), Xcode 12+ + SDK can be imported to iOS 11, but it will work only since iOS 13. ### Installation From ee6861ec54d090d46f113f61ba88f8afd319de66 Mon Sep 17 00:00:00 2001 From: Alexander Osokin Date: Tue, 6 Apr 2021 08:56:37 +0300 Subject: [PATCH 3/6] Update .gitattributes --- .gitattributes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index ca1324eb0..57dac6c35 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -fastlane/* linguist-vendored -TangemSdk/TangemSdk/Crypto/secp256k1/* linguist-vendored \ No newline at end of file +fastlane/** linguist-vendored +TangemSdk/TangemSdk/Crypto/secp256k1/** linguist-vendored From bd7d18c258a9c579abd5144019cc4a19f53be5ba Mon Sep 17 00:00:00 2001 From: Andrey Lazutkin Date: Sat, 10 Apr 2021 09:34:16 +0300 Subject: [PATCH 4/6] IOS-127 --- .github/workflows/create-release-branch.yml | 34 +++ .github/workflows/neutral-build-tag.yml | 42 +++ .github/workflows/neutral-build.yml | 32 +++ .github/workflows/publish-release.yml | 49 ++++ Gemfile | 4 + Gemfile.lock | 297 ++++++++++++++++++++ 6 files changed, 458 insertions(+) create mode 100644 .github/workflows/create-release-branch.yml create mode 100644 .github/workflows/neutral-build-tag.yml create mode 100644 .github/workflows/neutral-build.yml create mode 100644 .github/workflows/publish-release.yml create mode 100644 Gemfile create mode 100644 Gemfile.lock diff --git a/.github/workflows/create-release-branch.yml b/.github/workflows/create-release-branch.yml new file mode 100644 index 000000000..dd53c19aa --- /dev/null +++ b/.github/workflows/create-release-branch.yml @@ -0,0 +1,34 @@ +name: Create release branch +on: + workflow_dispatch: + inputs: + versionName: + description: 'Name of version (ie 1.3.0)' + required: true + +jobs: + createrelease: + name: Create release branch + runs-on: ubuntu-latest + #if: contains(github.ref, 'develop') # Only for develop branch + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Create release branch + run: git checkout -b release/v${{ github.event.inputs.versionName }} + + - name: Initialize mandatory git config + run: | + git config user.name "Tangem Bot" + git config user.email mobile@tangem.com + + - name: Change version + run: | + echo ${{ github.event.inputs.versionName }} > VERSION + git add VERSION + git commit -m "Prepare release v${{ github.event.inputs.versionName }}" + + - name: Push new branch + run: git push origin release/v${{ github.event.inputs.versionName }} diff --git a/.github/workflows/neutral-build-tag.yml b/.github/workflows/neutral-build-tag.yml new file mode 100644 index 000000000..591f4f46f --- /dev/null +++ b/.github/workflows/neutral-build-tag.yml @@ -0,0 +1,42 @@ +name: Neutral Build Tag + +on: + push: + branches: [ develop ] + +env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + +jobs: + tag: + name: Create tag + runs-on: macOS-latest + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + + - name: Create tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/${{ steps.extract_branch.outputs.branch }}-${{ github.run_number }}", + sha: context.sha + }) + - name: Build notification + if: always() + uses: adamkdean/simple-slack-notify@master + with: + channel: '#development-ios' + status: ${{ job.status }} + success_text: 'Neutral build #${{ github.run_number }} completed successfully. Tag has been created.' + failure_text: 'GitHub Action #${{ github.run_number }} failed. Tag has not been not created.' + cancelled_text: 'GitHub Action #${{ github.run_number }} was cancelled' + fields: | + [{"title": "TAG", "value": "${{ steps.extract_branch.outputs.branch }}-${{ github.run_number }}"}, + {"title": "Action URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}] diff --git a/.github/workflows/neutral-build.yml b/.github/workflows/neutral-build.yml new file mode 100644 index 000000000..5aa29b319 --- /dev/null +++ b/.github/workflows/neutral-build.yml @@ -0,0 +1,32 @@ +name: Neutral Build + +on: + pull_request: + branches: + - 'release/**' + - 'develop' + workflow_dispatch: + +env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + +jobs: + test: + name: Test + runs-on: macOS-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Bundle Install + run: bundle install + - name: Tests + run: bundle exec fastlane test + - name: Build notification + if: failure() + uses: adamkdean/simple-slack-notify@master + with: + channel: '#development-ios' + text: 'Neutral build #${{ github.run_number }} failed' + color: 'danger' + fields: | + [{ "title": "Action URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}] diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 000000000..e9f841e75 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,49 @@ +name: Publish Release + +on: + #push: + # branches: [ master ] + workflow_dispatch: + +jobs: + merges: + name: Publish release + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v2 + + - name: Bundle Install + run: bundle install + + - name: Prepare variables + run: | + VER=$(cat VERSION) + echo "VERSION=$VER" >> $GITHUB_ENV + + - name: Create a release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: v${{ env.VERSION }} + release_name: Release v${{ env.VERSION }} + commitish: release/v${{ env.VERSION }} + draft: false + prerelease: false + + - name: Bump version in podspec + run: fastlane run version_bump_podspec path:"TangemSdk.podspec" version_number:${{ env.VERSION }} + + - name: Create pull request to develop + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createPullRequest({ + owner: 'context.repo.owner', + repo: 'context.repo.repo', + title: 'Release v${{ github.event.inputs.versionName }}', + head: 'release/v${{ github.event.inputs.versionName }}', + base: 'develop' + }) diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..bb94aef51 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "fastlane" +gem "cocoapods" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..ad2952ea0 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,297 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.3) + activesupport (5.2.5) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + babosa (1.0.2) + cert (1.4.4) + fastlane_core (>= 0.55.0, < 1.0.0) + spaceship (>= 0.37.0, < 1.0.0) + claide (1.0.3) + cocoapods (1.10.1) + addressable (~> 2.6) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.10.1) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.6.6) + nap (~> 1.0) + ruby-macho (~> 1.4) + xcodeproj (>= 1.19.0, < 2.0) + cocoapods-core (1.10.1) + activesupport (> 5.0, < 6) + addressable (~> 2.6) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.4) + cocoapods-downloader (1.4.0) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.0) + cocoapods-trunk (1.5.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + concurrent-ruby (1.1.8) + credentials_manager (0.16.4) + colored + commander (>= 4.3.5) + highline (>= 1.7.1) + security + deliver (1.16.1) + credentials_manager (>= 0.16.2, < 1.0.0) + fastimage (~> 1.6) + fastlane_core (>= 0.58.0, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + spaceship (>= 0.38.5, < 1.0.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.6) + escape (0.0.4) + ethon (0.12.0) + ffi (>= 1.3.0) + excon (0.79.0) + faraday (0.17.4) + multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.7) + faraday (>= 0.8.0) + http-cookie (~> 1.0.0) + faraday_middleware (0.14.0) + faraday (>= 0.7.4, < 1.0) + fastimage (1.6.8) + addressable (~> 2.3, >= 2.3.5) + fastlane (1.92.0) + addressable (~> 2.3) + cert (>= 1.4.1, < 2.0.0) + credentials_manager (>= 0.16.0, < 1.0.0) + deliver (>= 1.11.3, < 2.0.0) + fastlane_core (>= 0.44.2, < 1.0.0) + frameit (>= 2.6.2, < 3.0.0) + gym (>= 1.6.3, < 2.0.0) + krausefx-shenzhen (>= 0.14.7) + match (>= 0.6.0, < 1.0.0) + multipart-post (~> 2.0.0) + pem (>= 1.3.1, < 2.0.0) + pilot (>= 1.7.0, < 2.0.0) + plist (~> 3.1.0) + produce (>= 1.1.2, < 2.0.0) + scan (>= 0.7.1, < 1.0.0) + screengrab (>= 0.3.2, < 1.0.0) + sigh (>= 1.8.0, < 2.0.0) + slack-notifier (~> 1.3) + snapshot (>= 1.12.1, < 2.0.0) + spaceship (>= 0.27.1, < 1.0.0) + supply (>= 0.7.0, < 1.0.0) + terminal-notifier (~> 1.6.2) + terminal-table (~> 1.4.5) + xcode-install (~> 1.4.0) + xcodeproj (>= 0.20, < 2.0.0) + xcpretty (>= 0.2.1) + fastlane_core (0.59.0) + colored + commander (>= 4.4.0, <= 5.0.0) + credentials_manager (>= 0.16.2, < 1.0.0) + excon (>= 0.45.0, < 1.0) + gh_inspector (>= 1.0.1, < 2.0.0) + highline (>= 1.7.2) + json + multi_json + plist (>= 3.1.0, < 4.0.0) + rubyzip (~> 1.1.6) + terminal-table (>= 1.4.5, < 2.0.0) + ffi (1.15.0) + fourflusher (2.3.1) + frameit (2.8.0) + deliver (> 0.3) + fastimage (~> 1.6.3) + fastlane_core (>= 0.52.1, < 1.0.0) + mini_magick (~> 4.5.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + google-api-client (0.9.4) + addressable (~> 2.3) + googleauth (~> 0.5) + httpclient (~> 2.7) + hurley (~> 0.1) + memoist (~> 0.11) + mime-types (>= 1.6) + representable (~> 2.3.0) + retriable (~> 2.0) + thor (~> 0.19) + googleauth (0.16.1) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (~> 0.14) + gym (1.12.1) + fastlane_core (>= 0.57.0, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + rubyzip (>= 1.1.7) + terminal-table (>= 1.4.5, < 2.0.0) + xcpretty (>= 0.2.4, < 1.0.0) + highline (2.0.3) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + hurley (0.2) + i18n (1.8.10) + concurrent-ruby (~> 1.0) + json (1.8.6) + jwt (2.2.2) + krausefx-shenzhen (0.14.11) + commander (>= 4.3, < 5.0) + dotenv (>= 0.7) + faraday (~> 0.9) + faraday_middleware (~> 0.9) + highline (>= 1.7.2) + json (~> 1.8) + net-sftp (~> 2.1.2) + plist (>= 3.1.0, < 4.0.0) + rubyzip (~> 1.1) + security (~> 0.1.3) + terminal-table (~> 1.4.5) + match (0.11.1) + cert (>= 1.4.4, < 2.0.0) + credentials_manager (>= 0.16.2, < 1.0.0) + fastlane_core (>= 0.58.0, < 1.0.0) + security + sigh (>= 1.12.1, < 2.0.0) + spaceship (>= 0.38.5, < 1.0.0) + memoist (0.16.2) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2021.0225) + mini_magick (4.5.1) + minitest (5.14.4) + molinillo (0.6.6) + multi_json (1.15.0) + multi_xml (0.6.0) + multipart-post (2.0.0) + nanaimo (0.3.0) + nap (1.1.0) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (6.1.0) + netrc (0.11.0) + os (1.1.1) + pem (1.4.1) + fastlane_core (>= 0.58.0, < 1.0.0) + spaceship (>= 0.38.5, < 1.0.0) + pilot (1.12.1) + credentials_manager (>= 0.16.0) + fastlane_core (>= 0.56.0, < 1.0.0) + spaceship (>= 0.37.0, < 1.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + plist (3.1.0) + produce (1.3.2) + fastlane_core (>= 0.57.2, < 1.0.0) + spaceship (>= 0.38.4, < 1.0.0) + public_suffix (4.0.6) + representable (2.3.0) + uber (~> 0.0.7) + retriable (2.1.0) + rouge (2.0.7) + ruby-macho (1.4.0) + rubyzip (1.1.7) + scan (0.14.2) + fastlane_core (>= 0.57.0, < 1.0.0) + slack-notifier (~> 1.3) + terminal-table (>= 1.4.5, < 2.0.0) + xcpretty (>= 0.2.4, < 1.0.0) + xcpretty-travis-formatter (>= 0.0.3) + screengrab (0.5.6) + fastlane_core (>= 0.55.0, < 1.0.0) + security (0.1.5) + sigh (1.12.1) + fastlane_core (>= 0.57.2, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + spaceship (>= 0.38.4, < 1.0.0) + signet (0.15.0) + addressable (~> 2.3) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + slack-notifier (1.5.1) + snapshot (1.16.4) + fastimage (~> 1.6.3) + fastlane_core (>= 0.57.0, < 1.0.0) + plist (>= 3.1.0, < 4.0.0) + xcpretty (>= 0.2.4, < 1.0.0) + spaceship (0.39.0) + babosa (= 1.0.2) + colored + credentials_manager (>= 0.16.0) + faraday (~> 0.9) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 0.9) + fastimage (>= 1.6) + multi_xml (~> 0.5) + plist (>= 3.1.0, < 4.0.0) + supply (0.8.0) + credentials_manager (>= 0.16.0) + fastlane_core (>= 0.52.0) + google-api-client (~> 0.9.1) + terminal-notifier (1.6.3) + terminal-table (1.4.5) + thor (0.20.3) + thread_safe (0.3.6) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (1.2.9) + thread_safe (~> 0.1) + uber (0.0.15) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) + xcode-install (1.4.0) + claide (>= 0.9.1, < 1.1.0) + spaceship (>= 0.25.1, < 1.0.0) + xcodeproj (1.19.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.1) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + x86_64-darwin-20 + +DEPENDENCIES + cocoapods + fastlane + +BUNDLED WITH + 2.2.16 From 07be7cf234a34bb18209f1acc3f4734c24ce4c79 Mon Sep 17 00:00:00 2001 From: Andrey Lazutkin Date: Sat, 10 Apr 2021 09:42:55 +0300 Subject: [PATCH 5/6] Update neutral-build.yml --- .github/workflows/neutral-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/neutral-build.yml b/.github/workflows/neutral-build.yml index 5aa29b319..ff1be4ecf 100644 --- a/.github/workflows/neutral-build.yml +++ b/.github/workflows/neutral-build.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_IOS }} jobs: test: From 66289903670a49159e515153dde7a1582ef6a382 Mon Sep 17 00:00:00 2001 From: Andrey Lazutkin Date: Sat, 10 Apr 2021 10:22:54 +0300 Subject: [PATCH 6/6] Rename Gemfile.lock to commented_Gemfile.lock --- Gemfile.lock => commented_Gemfile.lock | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Gemfile.lock => commented_Gemfile.lock (100%) diff --git a/Gemfile.lock b/commented_Gemfile.lock similarity index 100% rename from Gemfile.lock rename to commented_Gemfile.lock