Skip to content

Commit 587a5aa

Browse files
committed
Merge jribbink/fund-react-hook into crypto-ui-integration
Keep platform-agnostic hooks (useFund, useFundingCapabilities, usePaymentsClient) in react-core package. React-sdk only re-exports from react-core.
2 parents f231d82 + 039f143 commit 587a5aa

File tree

160 files changed

+7440
-4228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+7440
-4228
lines changed

.github/workflows/release.yml

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,83 @@ on:
44
push:
55
branches:
66
- master
7+
pull_request:
8+
types: [closed]
9+
branches:
10+
- master
711

812
concurrency: ${{ github.workflow }}-${{ github.ref }}
913

1014
jobs:
11-
release:
12-
name: Release
15+
# Job 1: Create/update Version PR (on push to master)
16+
version:
17+
if: github.event_name == 'push'
18+
name: Create Version PR
1319
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
pull-requests: write
1423
steps:
1524
- name: Checkout Repo
1625
uses: actions/checkout@v4
1726
with:
1827
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1928
fetch-depth: 0
2029

21-
# v18 node
22-
- name: Setup Node.js lts/hydrogen
23-
uses: actions/setup-node@v2
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
2432
with:
25-
node-version: lts/hydrogen
33+
node-version: 22
2634

2735
- name: Install Dependencies
2836
run: npm i
2937

30-
- name: Create Release Pull Request or Publish to npm
31-
id: changesets
38+
- name: Create Release Pull Request
39+
uses: changesets/action@v1
40+
with:
41+
title: "Version Packages"
42+
commit: "Version Packages"
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
46+
# Job 2: Publish to npm (when Version PR is merged)
47+
publish:
48+
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'Version Packages')
49+
name: Publish to npm
50+
runs-on: ubuntu-latest
51+
permissions:
52+
id-token: write
53+
contents: write
54+
steps:
55+
- name: Checkout Repo
56+
uses: actions/checkout@v4
57+
with:
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
fetch-depth: 0
60+
61+
- name: Setup Node.js
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: 22
65+
registry-url: "https://registry.npmjs.org"
66+
67+
- name: Upgrade npm for OIDC support
68+
run: npm install -g npm@latest
69+
70+
- name: Install Dependencies
71+
run: npm i
72+
73+
- name: Build packages
74+
run: npm run build
75+
76+
- name: Publish to npm
3277
uses: changesets/action@v1
3378
with:
34-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
35-
publish: npm run release
79+
publish: npx changeset publish
3680
env:
3781
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
82+
# Clear tokens to allow OIDC authentication
83+
# https://github.com/orgs/community/discussions/176761
84+
# https://github.com/changesets/changesets/issues/1152
85+
NODE_AUTH_TOKEN: ""
86+
NPM_TOKEN: ""

0 commit comments

Comments
 (0)