Skip to content

Commit fc6927f

Browse files
authored
Merge pull request #18 from JairajJangle/develop
Beta
2 parents ad4f7c8 + a43ccc4 commit fc6927f

39 files changed

+17820
-14105
lines changed

.circleci/config.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

.github/FUNDING.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# These are supported funding model platforms
22

3+
custom: ["https://www.paypal.com/paypalme/jairajjangle001/usd", "https://github.com/JairajJangle/OpenCV-Catalogue/blob/master/.github/Jairaj_Jangle_Google_Pay_UPI_QR_Code.jpg"]
4+
liberapay: FutureJJ
5+
ko_fi: futurejj
6+
37
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
48
patreon: # Replace with a single Patreon username
59
open_collective: # Replace with a single Open Collective username
6-
ko_fi: futurejj
710
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
811
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: FutureJJ
1012
issuehunt: # Replace with a single IssueHunt username
1113
otechie: # Replace with a single Otechie username
12-
custom: ["https://www.paypal.com/paypalme/jairajjangle001/usd"]

.github/actions/setup/action.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version-file: .nvmrc
11+
12+
# Create a minimal .yarnrc.yml without any plugin references
13+
- name: Create minimal Yarn config
14+
run: |
15+
cat > .yarnrc.yml << EOF
16+
nodeLinker: node-modules
17+
nmHoistingLimits: workspaces
18+
EOF
19+
shell: bash
20+
21+
# Setup Corepack for proper Yarn version management
22+
- name: Setup Corepack and Yarn
23+
run: |
24+
corepack enable
25+
corepack prepare yarn@3.6.1 --activate
26+
shell: bash
27+
28+
# Create required directory and install plugins
29+
- name: Setup plugins
30+
run: |
31+
mkdir -p .yarn/plugins
32+
yarn plugin import @yarnpkg/plugin-interactive-tools
33+
yarn plugin import @yarnpkg/plugin-workspace-tools
34+
shell: bash
35+
36+
# Now update .yarnrc.yml to include the plugins
37+
- name: Update Yarn config with plugins
38+
run: |
39+
cat > .yarnrc.yml << EOF
40+
nodeLinker: node-modules
41+
nmHoistingLimits: workspaces
42+
43+
plugins:
44+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
45+
spec: "@yarnpkg/plugin-interactive-tools"
46+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
47+
spec: "@yarnpkg/plugin-workspace-tools"
48+
EOF
49+
shell: bash
50+
51+
- name: Restore cache
52+
uses: actions/cache/restore@v4
53+
id: yarn-cache
54+
with:
55+
path: |
56+
**/node_modules
57+
.yarn/cache
58+
.yarn/unplugged
59+
.yarn/install-state.gz
60+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
61+
restore-keys: |
62+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
63+
${{ runner.os }}-yarn-
64+
65+
- name: Install dependencies
66+
run: yarn install
67+
shell: bash
68+
69+
- name: Save cache
70+
uses: actions/cache/save@v4
71+
if: steps.yarn-cache.outputs.cache-hit != 'true'
72+
with:
73+
path: |
74+
**/node_modules
75+
.yarn/cache
76+
.yarn/unplugged
77+
.yarn/install-state.gz
78+
key: ${{ steps.yarn-cache.outputs.cache-primary-key || format('{0}-yarn-{1}-{2}', runner.os, hashFiles('yarn.lock'), hashFiles('**/package.json', '!node_modules/**')) }}
Loading

.github/assets/demo_app_ss.png

291 KB
Loading

.github/assets/paypal_donate.png

12.6 KB
Loading

.github/assets/upi.png

19.6 KB
Loading

.github/workflows/beta-release.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Beta Release
2+
on:
3+
push:
4+
branches:
5+
- beta
6+
pull_request:
7+
branches:
8+
- beta
9+
merge_group:
10+
types:
11+
- checks_requested
12+
13+
env:
14+
NODE_OPTIONS: --experimental-vm-modules
15+
16+
jobs:
17+
lint:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup
24+
uses: ./.github/actions/setup
25+
26+
- name: Lint files
27+
run: yarn lint
28+
29+
- name: Typecheck files
30+
run: yarn typecheck
31+
32+
test:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Setup
39+
uses: ./.github/actions/setup
40+
41+
- name: Run unit tests
42+
run: yarn test:cov
43+
44+
- name: Update Coverage Badge
45+
# GitHub actions: default branch variable
46+
# https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable
47+
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
48+
uses: we-cli/coverage-badge-action@main
49+
50+
build-library:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
56+
- name: Setup
57+
uses: ./.github/actions/setup
58+
59+
- name: Install missing dependencies
60+
run: yarn add -D @ark/schema || echo "Package already installed or not needed"
61+
62+
- name: Build package
63+
run: yarn prepare
64+
65+
build-web:
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v4
70+
71+
- name: Setup
72+
uses: ./.github/actions/setup
73+
74+
- name: Prepare library
75+
run: yarn prepare
76+
77+
- name: Build example for Web
78+
run: |
79+
yarn example expo export --platform web
80+
81+
publish-beta:
82+
needs: [lint, test, build-library, build-web]
83+
runs-on: ubuntu-latest
84+
permissions:
85+
contents: write # To publish a GitHub release
86+
issues: write # To comment on released issues
87+
pull-requests: write # To comment on released pull requests
88+
id-token: write # To enable use of OIDC for npm provenance
89+
if: github.ref == 'refs/heads/beta'
90+
steps:
91+
- name: Checkout
92+
uses: actions/checkout@v4
93+
with:
94+
fetch-depth: 0 # Ensures all tags are fetched
95+
96+
- name: Setup
97+
uses: ./.github/actions/setup
98+
99+
- name: Setup Node.js
100+
uses: actions/setup-node@v4
101+
with:
102+
node-version: "lts/*" # Use the latest LTS version of Node.js
103+
registry-url: 'https://registry.npmjs.org/' # Specify npm registry
104+
105+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
106+
run: npm audit signatures # Check the signatures to verify integrity
107+
108+
- name: Release Beta
109+
run: npx semantic-release # Run semantic-release to manage versioning and publishing
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
112+
113+
# Why NODE_AUTH_TOKEN instead of NPM_TOKEN: https://github.com/semantic-release/semantic-release/issues/2313
114+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # npm token for publishing package
115+

0 commit comments

Comments
 (0)