Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bcgov/bc-wallet-mobile into…
Browse files Browse the repository at this point in the history
… feat-rev-reg-async
  • Loading branch information
wadeking98 committed Oct 17, 2023
2 parents 5fddcd3 + 909dffd commit 163a51b
Show file tree
Hide file tree
Showing 9 changed files with 149 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ inputs:
description: The status of the job
required: true
webhook_url:
description: The RocketChat Webhook URL
required: true
webhook_token:
description: The access token for the Webhook URL
description: |
The RocketChat Webhook URL as copied from Rocket.Chat.
required: true
github_token:
description: |
The GitHub access token for the action so it can fetch
information from the GitHub API.
required: false

runs:
using: composite
Expand All @@ -30,4 +33,4 @@ runs:
channel: "#bc-digital-wallet-core-team"
commit: true
url: ${{ inputs.webhook_url }}
token: ${{ inputs.webhook_token }}
token: ${{ inputs.github_token }}
1 change: 1 addition & 0 deletions .github/workflows/actions/update-ledgers/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ runs:
using: composite
steps:
- name: Update ledgers
shell: bash
run: |
node bifold/scripts/make-blocks.js
Expand Down
68 changes: 30 additions & 38 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
build-ios:
needs: [check-ios-secrets]
runs-on: macos-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/app/Gemfile
steps:
- uses: actions/checkout@v2

Expand All @@ -66,19 +68,10 @@ jobs:
- name: Setup NodeJS
uses: ./.github/workflows/actions/setup-node

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
cache: 'gradle'
server-id: github
settings-path: ${{ github.workspace }}

- name: Configure ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
working-directory: ./app

- name: What XCode are we using?
run: |
Expand Down Expand Up @@ -118,15 +111,14 @@ jobs:
yarn install --immutable && \
git status
# Ledgers are missing namespace, not compatible.
# - name: Update ledgers
# uses: ./.github/workflows/actions/update-ledgers
- name: Update ledgers
uses: ./.github/workflows/actions/update-ledgers

- name: Install iOS dependencies
# if: steps.pod-cache.outputs.cache-hit != 'true' || steps.npm-cache.outputs.cache-hit != 'true'
working-directory: app/ios
run: |
gem install cocoapods && \
bundle install --frozen --gemfile=${BUNDLE_GEMFILE} && \
pod install && \
git status && \
git diff Podfile.lock
Expand Down Expand Up @@ -155,7 +147,7 @@ jobs:
echo "IAS_PORTAL_URL=${IAS_PORTAL_URL}" >>.env
echo "IAS_AGENT_INVITE_URL=${IAS_AGENT_INVITE_URL}" >>.env
echo "OCA_URL=${OCA_URL}" >>.env
- name: Set Push Notification Capability
working-directory: app/ios/AriesBifold
env:
Expand Down Expand Up @@ -205,10 +197,10 @@ jobs:
export_options: options.plist
ouput_artifact_ref: ios-artifact

# - name: Publish to GitHub Packages Registry
# run: mvn deploy:deploy-file -s $GITHUB_WORKSPACE/settings.xml -DgroupId=com.github.bcgov -DartifactId=bc-wallet -Dclassifier=ios -DrepositoryId=github -Durl=https://maven.pkg.github.com/$GITHUB_REPOSITORY -Dversion=${{ env.appBuildVersion }}.${{ env.appBuildNumber }} -DgeneratePom=false -Dpackaging=aab -Dfile=export/BCWallet.ipa
# env:
# GITHUB_TOKEN: ${{ github.token }}
# - name: Publish to GitHub Packages Registry
# run: mvn deploy:deploy-file -s $GITHUB_WORKSPACE/settings.xml -DgroupId=com.github.bcgov -DartifactId=bc-wallet -Dclassifier=ios -DrepositoryId=github -Durl=https://maven.pkg.github.com/$GITHUB_REPOSITORY -Dversion=${{ env.appBuildVersion }}.${{ env.appBuildNumber }} -DgeneratePom=false -Dpackaging=aab -Dfile=export/BCWallet.ipa
# env:
# GITHUB_TOKEN: ${{ github.token }}

- name: Upload artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -246,7 +238,7 @@ jobs:
job_title: "BC Wallet iOS Build - Run number ${{ github.run_number }}"
job_status: ${{ job.status }}
webhook_url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
webhook_token: ${{ secrets.ROCKETCHAT_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

build-android:
needs: [check-android-secrets]
Expand All @@ -267,15 +259,15 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: "zulu"
java-version: 11
cache: 'gradle'
cache: "gradle"
server-id: github
settings-path: ${{ github.workspace }}

# Ledgers are missing namespace, not compatible.
# - name: Updaet ledgers
# uses: ./.github/workflows/actions/update-ledgers
- name: Update ledgers
uses: ./.github/workflows/actions/update-ledgers

- name: Install dependencies
working-directory: ./
run: |
Expand Down Expand Up @@ -312,14 +304,14 @@ jobs:
keytool -list -v -keystore release.keystore -alias ${PLAY_STORE_JKS_ALIAS} -storepass:env PLAY_STORE_JKS_PASSWD | \
grep "SHA1"
# - name: Android debug build
# if: github.ref_name != 'main' || needs.check-android-secrets.outputs.isReleaseBuild != 'true'
# working-directory: app/android
# env:
# VERSION_CODE: ${{ env.appBuildNumber }}
# VERSION_NAME: ${{ env.appBuildVersion }}
# run: |
# ./gradlew --no-daemon bundleRelease
# - name: Android debug build
# if: github.ref_name != 'main' || needs.check-android-secrets.outputs.isReleaseBuild != 'true'
# working-directory: app/android
# env:
# VERSION_CODE: ${{ env.appBuildNumber }}
# VERSION_NAME: ${{ env.appBuildVersion }}
# run: |
# ./gradlew --no-daemon bundleRelease

- name: Android release build
#if: github.ref_name == 'main' && needs.check-android-secrets.outputs.isReleaseBuild == 'true'
Expand All @@ -335,10 +327,10 @@ jobs:
./gradlew assembleRelease && \
find . -type f -name '*.apk'
# - name: Publish to GitHub Packages Registry
# run: mvn deploy:deploy-file -s $GITHUB_WORKSPACE/settings.xml -DgroupId=com.github.bcgov -DartifactId=bc-wallet -Dclassifier=android -DrepositoryId=github -Durl=https://maven.pkg.github.com/$GITHUB_REPOSITORY -Dversion=${{ env.appBuildVersion }}.${{ env.appBuildNumber }} -DgeneratePom=false -Dpackaging=aab -Dfile=app/android/app/build/outputs/bundle/release/app-release.aab
# env:
# GITHUB_TOKEN: ${{ github.token }}
# - name: Publish to GitHub Packages Registry
# run: mvn deploy:deploy-file -s $GITHUB_WORKSPACE/settings.xml -DgroupId=com.github.bcgov -DartifactId=bc-wallet -Dclassifier=android -DrepositoryId=github -Durl=https://maven.pkg.github.com/$GITHUB_REPOSITORY -Dversion=${{ env.appBuildVersion }}.${{ env.appBuildNumber }} -DgeneratePom=false -Dpackaging=aab -Dfile=app/android/app/build/outputs/bundle/release/app-release.aab
# env:
# GITHUB_TOKEN: ${{ github.token }}
- name: List Artifacts
#if: github.ref_name == 'main' && needs.check-android-secrets.outputs.isReleaseBuild == 'true'
run: |
Expand Down Expand Up @@ -382,7 +374,7 @@ jobs:
job_title: "BC Wallet Android Build - Run number ${{ github.run_number }}"
job_status: ${{ job.status }}
webhook_url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
webhook_token: ${{ secrets.ROCKETCHAT_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

ship-to-saucelabs:
if: github.ref_name == 'main' && needs.check-android-secrets.outputs.isReleaseBuild == 'true' && needs.check-ios-secrets.outputs.isReleaseBuild == 'true'
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ app/patches/react-native-gifted-chat*.patch

# xcode
xcuserdata/
.xcode.env.local

# gem
app/vendor/bundle/**
1 change: 1 addition & 0 deletions app/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.8
1 change: 1 addition & 0 deletions app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.12'
gem 'activesupport', '~> 7.0.8'
99 changes: 99 additions & 0 deletions app/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.13.0)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.13.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.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.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.13.0)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
minitest (5.20.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.23.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)

PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 7.0.8)
cocoapods (~> 1.12)

RUBY VERSION
ruby 2.7.8p225

BUNDLED WITH
2.1.4
6 changes: 4 additions & 2 deletions app/src/request-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useProofRequestTemplates = (useDevRestrictions: boolean) => {
{ schema_id: 'Ui6HA36FvN83cEtmYYHxrn:2:unverified_person:0.1.0', issuer_did: 'Ui6HA36FvN83cEtmYYHxrn' },
]

const personSchema = 'XUxBrVSALWHLeycAUhrNr9:2:Person:1.0'
const personSchema = 'RGjWbW1eycP7FrMf4QJvX8:2:Person:1.0'
const verifiedPersonDevRestrictions = [
// IDIM Person credential
{ schema_id: 'XpgeQa93eZvGSZBZef3PHn:2:Person:1.0', issuer_did: '7xjfawcnyTUcduWVysLww5' }, // SIT
Expand All @@ -28,12 +28,13 @@ export const useProofRequestTemplates = (useDevRestrictions: boolean) => {
const verifiedPersonRestrictions = [
// IDIM Person credential
{ schema_id: 'RGjWbW1eycP7FrMf4QJvX8:2:Person:1.0', issuer_did: 'RGjWbW1eycP7FrMf4QJvX8' }, // Prod
{ cred_def_id: 'RGjWbW1eycP7FrMf4QJvX8:3:CL:13:Person' },
...(useDevRestrictions ? verifiedPersonDevRestrictions : []),
]

const personRestrictions = [...verifiedPersonRestrictions, ...openvpRestrictions]

const memberCardSchema = 'XUxBrVSALWHLeycAUhrNr9:2:Member Card:1.5.1'
const memberCardSchema = '4xE68b6S5VRFrKMMG1U95M:2:Member Card:1.5.1'
const memberCardDevRestrictions = [
// LSBC Member Card
{ schema_id: '4xE68b6S5VRFrKMMG1U95M:2:Member Card:1.5.1', issuer_did: '4xE68b6S5VRFrKMMG1U95M' }, // Prod
Expand All @@ -46,6 +47,7 @@ export const useProofRequestTemplates = (useDevRestrictions: boolean) => {
const memberCardRestrictions = [
// LSBC Member Card
{ schema_id: '4xE68b6S5VRFrKMMG1U95M:2:Member Card:1.5.1', issuer_did: '4xE68b6S5VRFrKMMG1U95M' }, // Prod
{ cred_def_id: '4xE68b6S5VRFrKMMG1U95M:3:CL:59232:default' },
...(useDevRestrictions ? memberCardDevRestrictions : []),
]

Expand Down
2 changes: 1 addition & 1 deletion bifold

0 comments on commit 163a51b

Please sign in to comment.