Skip to content

Beta #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 17, 2025
Merged

Beta #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 0 additions & 98 deletions .circleci/config.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# These are supported funding model platforms

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"]
liberapay: FutureJJ
ko_fi: futurejj

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: futurejj
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: FutureJJ
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://www.paypal.com/paypalme/jairajjangle001/usd"]
78 changes: 78 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Setup
description: Setup Node.js and install dependencies

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

# Create a minimal .yarnrc.yml without any plugin references
- name: Create minimal Yarn config
run: |
cat > .yarnrc.yml << EOF
nodeLinker: node-modules
nmHoistingLimits: workspaces
EOF
shell: bash

# Setup Corepack for proper Yarn version management
- name: Setup Corepack and Yarn
run: |
corepack enable
corepack prepare yarn@3.6.1 --activate
shell: bash

# Create required directory and install plugins
- name: Setup plugins
run: |
mkdir -p .yarn/plugins
yarn plugin import @yarnpkg/plugin-interactive-tools
yarn plugin import @yarnpkg/plugin-workspace-tools
shell: bash

# Now update .yarnrc.yml to include the plugins
- name: Update Yarn config with plugins
run: |
cat > .yarnrc.yml << EOF
nodeLinker: node-modules
nmHoistingLimits: workspaces

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
EOF
shell: bash

- name: Restore cache
uses: actions/cache/restore@v4
id: yarn-cache
with:
path: |
**/node_modules
.yarn/cache
.yarn/unplugged
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install
shell: bash

- name: Save cache
uses: actions/cache/save@v4
if: steps.yarn-cache.outputs.cache-hit != 'true'
with:
path: |
**/node_modules
.yarn/cache
.yarn/unplugged
.yarn/install-state.gz
key: ${{ steps.yarn-cache.outputs.cache-primary-key || format('{0}-yarn-{1}-{2}', runner.os, hashFiles('yarn.lock'), hashFiles('**/package.json', '!node_modules/**')) }}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/demo_app_ss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/paypal_donate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/upi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Beta Release
on:
push:
branches:
- beta
pull_request:
branches:
- beta
merge_group:
types:
- checks_requested

env:
NODE_OPTIONS: --experimental-vm-modules

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

- 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@v4

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

- name: Run unit tests
run: yarn test:cov

- name: Update Coverage Badge
# GitHub actions: default branch variable
# https://stackoverflow.com/questions/64781462/github-actions-default-branch-variable
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: we-cli/coverage-badge-action@main

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

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

- name: Install missing dependencies
run: yarn add -D @ark/schema || echo "Package already installed or not needed"

- name: Build package
run: yarn prepare

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

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

- name: Prepare library
run: yarn prepare

- name: Build example for Web
run: |
yarn example expo export --platform web

publish-beta:
needs: [lint, test, build-library, build-web]
runs-on: ubuntu-latest
permissions:
contents: write # To publish a GitHub release
issues: write # To comment on released issues
pull-requests: write # To comment on released pull requests
id-token: write # To enable use of OIDC for npm provenance
if: github.ref == 'refs/heads/beta'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensures all tags are fetched

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*" # Use the latest LTS version of Node.js
registry-url: 'https://registry.npmjs.org/' # Specify npm registry

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures # Check the signatures to verify integrity

- name: Release Beta
run: npx semantic-release # Run semantic-release to manage versioning and publishing
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication

# Why NODE_AUTH_TOKEN instead of NPM_TOKEN: https://github.com/semantic-release/semantic-release/issues/2313
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # npm token for publishing package

Loading
Loading