Skip to content

Commit

Permalink
Merge pull request #8 from Tangem/CSS-127
Browse files Browse the repository at this point in the history
CSS-127
  • Loading branch information
lazutkin-andrey authored Apr 10, 2021
2 parents 8896265 + 818e171 commit 0e31d9c
Show file tree
Hide file tree
Showing 9 changed files with 461 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fastlane/** linguist-vendored
TangemSdk/TangemSdk/Crypto/secp256k1/** linguist-vendored
34 changes: 34 additions & 0 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
@@ -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 [email protected]
- 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 }}
42 changes: 42 additions & 0 deletions .github/workflows/neutral-build-tag.yml
Original file line number Diff line number Diff line change
@@ -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}"}]
32 changes: 32 additions & 0 deletions .github/workflows/neutral-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Neutral Build

on:
pull_request:
branches:
- 'release/**'
- 'develop'
workflow_dispatch:

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_IOS }}

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}"}]
49 changes: 49 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -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'
})
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "fastlane"
gem "cocoapods"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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
Expand Down Expand Up @@ -30,6 +29,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
Expand Down
1 change: 0 additions & 1 deletion TangemSdk/TangemSdk/Crypto/podssworkaround.h

This file was deleted.

Loading

0 comments on commit 0e31d9c

Please sign in to comment.