From 9e3491e0a9ae377ca704c7605405971ad8323804 Mon Sep 17 00:00:00 2001 From: Tyschenko Date: Fri, 11 Jul 2025 12:35:30 +0100 Subject: [PATCH 1/3] Add publish-release workflow --- .github/workflows/publish-release.yml | 50 +++++++++++++++++++++++++++ .nvmrc | 1 + CHANGELOG.md | 18 ++++++++++ 3 files changed, 69 insertions(+) create mode 100644 .github/workflows/publish-release.yml create mode 100644 .nvmrc create mode 100644 CHANGELOG.md diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 000000000..ef57ad9ed --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,50 @@ +name: Publish Release + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + publish-release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout and setup environment + uses: MetaMask/action-checkout-and-setup@v1 + with: + is-high-risk-environment: true + - uses: MetaMask/action-publish-release@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: yarn build + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: publish-release-artifacts-${{ github.sha }} + include-hidden-files: true + retention-days: 4 + path: | + ./packages/**/dist + ./node_modules/.yarn-state.yml + + publish-npm-dry-run: + name: Dry run publish to NPM + runs-on: ubuntu-latest + needs: publish-release + + steps: + - name: Checkout and setup environment + uses: MetaMask/action-checkout-and-setup@v1 + with: + is-high-risk-environment: true + ref: ${{ github.sha }} + + - name: Restore build artifacts + uses: actions/download-artifact@v4 + with: + name: publish-release-artifacts-${{ github.sha }} + + - name: Dry run publish to NPM + uses: MetaMask/action-npm-publish@v5 diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..b009dfb9d --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..d1163b893 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Inject Javascript on iOS to detect all iFrames inside the current page and report them to the React app (https://github.com/MetaMask/react-native-webview-mm/pull/61) + +## [14.2.2] + +### Fixed + +- On iOS on opening of some Dapps there is download file pop up (https://github.com/MetaMask/react-native-webview-mm/pull/63) \ No newline at end of file From 5aa9d1e9bef07514e8eb25cf166bde9ecc8716f0 Mon Sep 17 00:00:00 2001 From: Tyschenko Date: Fri, 11 Jul 2025 15:27:26 +0100 Subject: [PATCH 2/3] feat: Updated publishing job and changelog --- .github/workflows/publish-release.yml | 16 ++++++------- CHANGELOG.md | 33 ++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index ef57ad9ed..38cb768ab 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,8 +1,6 @@ name: Publish Release on: - release: - types: [published] workflow_dispatch: jobs: @@ -27,24 +25,24 @@ jobs: retention-days: 4 path: | ./packages/**/dist - ./node_modules/.yarn-state.yml + ./node_modules/.yarn-integrity - publish-npm-dry-run: - name: Dry run publish to NPM + publish-npm: + name: Publish to NPM + environment: npm-publish runs-on: ubuntu-latest needs: publish-release - steps: - name: Checkout and setup environment uses: MetaMask/action-checkout-and-setup@v1 with: is-high-risk-environment: true ref: ${{ github.sha }} - - name: Restore build artifacts uses: actions/download-artifact@v4 with: name: publish-release-artifacts-${{ github.sha }} - - - name: Dry run publish to NPM + - name: Publish to NPM uses: MetaMask/action-npm-publish@v5 + with: + npm-token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d1163b893..731d5945d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Inject Javascript on iOS to detect all iFrames inside the current page and report them to the React app (https://github.com/MetaMask/react-native-webview-mm/pull/61) +- Inject Javascript on Android to detect all iFrames inside the current page and report them to the React app (https://github.com/MetaMask/react-native-webview-mm/pull/60) ## [14.2.2] ### Fixed -- On iOS on opening of some Dapps there is download file pop up (https://github.com/MetaMask/react-native-webview-mm/pull/63) \ No newline at end of file +- On iOS on opening of some Dapps there is download file pop up (https://github.com/MetaMask/react-native-webview-mm/pull/63) + +## [14.2.1] + +### Fixed + +- Download file requested when connecting to any Dapp (https://github.com/MetaMask/react-native-webview-mm/pull/58) + +## [14.2.0] + +### Added + +- Implement tapjacking prevention via 500ms delay (https://github.com/MetaMask/react-native-webview-mm/pull/54, https://github.com/MetaMask/react-native-webview-mm/pull/52) + +### Fixed + +- Fixes to blob downloading on both platforms (https://github.com/MetaMask/react-native-webview-mm/pull/51, https://github.com/MetaMask/react-native-webview-mm/pull/50) +- Fix to regular file downloads on iOS (https://github.com/MetaMask/react-native-webview-mm/pull/53) + +## [14.1.0] + +### Changed + +- bump ws from 6.2.2 to 6.2.3 in the npm_and_yarn group across 1 directory (https://github.com/MetaMask/react-native-webview-mm/pull/35) +- sync with upstream v13.13.5 (https://github.com/MetaMask/react-native-webview-mm/pull/47) + +[Unreleased]: https://github.com/MetaMask/react-native-webview-mm/compare/@metamask/MetaMask:react-native-webview-mm:release/14.2.2...main +[14.2.2]: https://github.com/MetaMask/react-native-webview-mm/compare/release/14.2.1...MetaMask:react-native-webview-mm:release/14.2.2 +[14.2.1]: https://github.com/MetaMask/react-native-webview-mm/compare/release/14.2.0...MetaMask:react-native-webview-mm:release/14.2.1 +[14.2.0]: https://github.com/MetaMask/react-native-webview-mm/compare/release/14.1.0...MetaMask:react-native-webview-mm:release/14.2.0 +[14.1.0]: https://github.com/MetaMask/react-native-webview-mm/compare/v14.0.4...v14.1.0 From e076245bfb4a884c8defd9e054a4f8f2852323c8 Mon Sep 17 00:00:00 2001 From: Tyschenko Date: Mon, 14 Jul 2025 10:25:06 +0100 Subject: [PATCH 3/3] Restore npm dry run step, fix CHANGELOG.md --- .github/workflows/publish-release.yml | 24 +++++++++++++++++++++++- CHANGELOG.md | 4 ++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 38cb768ab..aee76c47f 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -27,11 +27,33 @@ jobs: ./packages/**/dist ./node_modules/.yarn-integrity + publish-npm-dry-run: + needs: publish-release + runs-on: ubuntu-latest + steps: + - name: Checkout and setup environment + uses: MetaMask/action-checkout-and-setup@v1 + with: + is-high-risk-environment: true + ref: ${{ github.sha }} + - name: Restore build artifacts + uses: actions/download-artifact@v4 + with: + name: publish-release-artifacts-${{ github.sha }} + - name: Dry Run Publish + # omit npm-token token to perform dry run publish + uses: MetaMask/action-npm-publish@v5 + with: + slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + subteam: S04EF225J1M # @metamask-mobile-platform + env: + SKIP_PREPACK: true + publish-npm: name: Publish to NPM environment: npm-publish runs-on: ubuntu-latest - needs: publish-release + needs: publish-npm-dry-run steps: - name: Checkout and setup environment uses: MetaMask/action-checkout-and-setup@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 731d5945d..577dbcb28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,8 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - bump ws from 6.2.2 to 6.2.3 in the npm_and_yarn group across 1 directory (https://github.com/MetaMask/react-native-webview-mm/pull/35) - sync with upstream v13.13.5 (https://github.com/MetaMask/react-native-webview-mm/pull/47) -[Unreleased]: https://github.com/MetaMask/react-native-webview-mm/compare/@metamask/MetaMask:react-native-webview-mm:release/14.2.2...main -[14.2.2]: https://github.com/MetaMask/react-native-webview-mm/compare/release/14.2.1...MetaMask:react-native-webview-mm:release/14.2.2 +[Unreleased]: https://github.com/MetaMask/react-native-webview-mm/compare/6925354...main +[14.2.2]: https://github.com/MetaMask/react-native-webview-mm/compare/3be76c0...6925354 [14.2.1]: https://github.com/MetaMask/react-native-webview-mm/compare/release/14.2.0...MetaMask:react-native-webview-mm:release/14.2.1 [14.2.0]: https://github.com/MetaMask/react-native-webview-mm/compare/release/14.1.0...MetaMask:react-native-webview-mm:release/14.2.0 [14.1.0]: https://github.com/MetaMask/react-native-webview-mm/compare/v14.0.4...v14.1.0