Skip to content

Commit

Permalink
Merge pull request #9 from leapwallet/release/2.0.0
Browse files Browse the repository at this point in the history
Release/2.0.0
  • Loading branch information
baryon2 authored Dec 3, 2024
2 parents 250d7e8 + 3f0c57d commit 7c5ed78
Show file tree
Hide file tree
Showing 28 changed files with 3,101 additions and 3,611 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ runs:
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn install --cwd example --frozen-lockfile
yarn install --frozen-lockfile
yarn install --cwd example --frozen-lockfile --ignore-engines
yarn install --frozen-lockfile --ignore-engines
shell: bash
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Build package
run: yarn prepack

publish-lib:
publish-lib-npm:
if: github.ref == 'refs/heads/main'
needs: [lint, test]
runs-on: ubuntu-latest
Expand All @@ -60,8 +60,6 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
node-version: 16

- run: yarn
- run: yarn prepack
Expand All @@ -70,7 +68,26 @@ jobs:
git config user.email ${{ secrets.USER_EMAIL }}
git config user.name ${{ secrets.USER_NAME }}
- run: npm run release --ci --npm.skipChecks
- run: yarn publish --non-interactive --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-lib-github:
if: github.ref == 'refs/heads/main'
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- run: yarn
- run: yarn prepack
- run: yarn publish --non-interactive --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93 changes: 93 additions & 0 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI
on:
push:
branches:
- staging

env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Lint files
run: yarn lint

- name: Typecheck files
run: yarn typecheck

test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Build package
run: yarn prepack

publish-lib-npm:
if: github.ref == 'refs/heads/staging'
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- run: yarn
- run: yarn prepack
- run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> .npmrc
git config user.email ${{ secrets.USER_EMAIL }}
git config user.name ${{ secrets.USER_NAME }}
- run: yarn publish --tag beta
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-lib-github:
if: github.ref == 'refs/heads/staging'
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- run: yarn
- run: yarn prepack
- run: yarn publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.18.1
20.4.0
7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: [
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-typescript',
'module:metro-react-native-babel-preset',
],
};
1 change: 0 additions & 1 deletion example/.node-version

This file was deleted.

1 change: 0 additions & 1 deletion example/.ruby-version

This file was deleted.

7 changes: 5 additions & 2 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby File.read(File.join(__dir__, '.ruby-version')).strip
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.11', '>= 1.11.3'
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
16 changes: 10 additions & 6 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@

buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34

// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}

apply plugin: "com.facebook.react.rootproject"
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'LeapKeychainRnExample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/react-native-gradle-plugin')
includeBuild('../node_modules/@react-native/gradle-plugin')
Loading

0 comments on commit 7c5ed78

Please sign in to comment.