-
Notifications
You must be signed in to change notification settings - Fork 3
ci: automated release workflow (semantic-release + OIDC trusted publishing) #46
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
base: master
Are you sure you want to change the base?
Changes from all commits
98b99a2
807fb2b
a6cbefa
65aee1d
d3a7d66
60e2b62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Setup Node | ||
| description: Setup Node from .nvmrc and install dependencies with npm | ||
| inputs: | ||
| node-version: | ||
| description: Optional Node version override | ||
| required: false | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: ${{ inputs.node-version }} | ||
| node-version-file: .nvmrc | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: npm ci # respects .npmrc (legacy-peer-deps=true) |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| dry_run: | ||
| description: Run release in "dry run" mode (does not publish) | ||
| default: false | ||
| type: boolean | ||
|
|
||
| permissions: | ||
| id-token: write # Required for npm Trusted Publishing (OIDC) + provenance | ||
| contents: write # Required to push the changelog/version commit + create the GH Release | ||
|
|
||
| jobs: | ||
| package_release: | ||
| name: Release from "${{ github.ref_name }}" branch | ||
| runs-on: ubuntu-latest | ||
| # GH does not allow limiting branches in workflow_dispatch settings, so guard here. | ||
| if: ${{ inputs.dry_run || github.ref_name == 'master' || github.ref_name == 'beta' || startsWith(github.ref_name, 'release') || endsWith(github.ref_name, '.x') }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 # full history + tags required by semantic-release | ||
|
|
||
| - uses: ./.github/actions/setup-node | ||
|
|
||
| - name: Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: > | ||
| npx semantic-release | ||
| ${{ inputs.dry_run && '--dry-run' || '' }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||||||||
| { | ||||||||||||||||||
| "branches": [ | ||||||||||||||||||
| "+([0-9])?(.{+([0-9]),x}).x", | ||||||||||||||||||
| "master", | ||||||||||||||||||
| { "name": "beta", "prerelease": true } | ||||||||||||||||||
| ], | ||||||||||||||||||
| "plugins": [ | ||||||||||||||||||
| [ | ||||||||||||||||||
| "@semantic-release/commit-analyzer", | ||||||||||||||||||
| { | ||||||||||||||||||
| "preset": "conventionalcommits", | ||||||||||||||||||
| "releaseRules": [ | ||||||||||||||||||
| { "type": "refactor", "release": "patch" }, | ||||||||||||||||||
| { "scope": "deps", "release": "patch" } | ||||||||||||||||||
| ] | ||||||||||||||||||
|
Comment on lines
+12
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Line 14 matches any commit with scope 📝 Alternative configuration if type-based versioning should be preserved "releaseRules": [
{ "type": "refactor", "release": "patch" },
- { "scope": "deps", "release": "patch" }
+ { "type": "chore", "scope": "deps", "release": "patch" }
]Or document the current behavior if intentional. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| } | ||||||||||||||||||
| ], | ||||||||||||||||||
| [ | ||||||||||||||||||
| "@semantic-release/release-notes-generator", | ||||||||||||||||||
| { "preset": "conventionalcommits" } | ||||||||||||||||||
| ], | ||||||||||||||||||
| ["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" }], | ||||||||||||||||||
| "@semantic-release/npm", | ||||||||||||||||||
| [ | ||||||||||||||||||
| "@semantic-release/git", | ||||||||||||||||||
| { | ||||||||||||||||||
| "assets": ["CHANGELOG.md", "package.json", "package-lock.json"], | ||||||||||||||||||
| "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||||||||||||||||||
| } | ||||||||||||||||||
| ], | ||||||||||||||||||
| "@semantic-release/github" | ||||||||||||||||||
| ] | ||||||||||||||||||
| } | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,58 +2,19 @@ | |||||
|
|
||||||
| # React-Native-WebRTC | ||||||
|
|
||||||
| [](https://www.npmjs.com/package/react-native-webrtc) | ||||||
| [](https://www.npmjs.com/package/react-native-webrtc) | ||||||
| [](https://react-native-webrtc.discourse.group/) | ||||||
| [](https://www.npmjs.com/package/@stream-io/react-native-webrtc) | ||||||
| [](https://www.npmjs.com/package/@stream-io/react-native-webrtc) | ||||||
|
|
||||||
| A WebRTC module for React Native. | ||||||
|
|
||||||
| ## Feature Overview | ||||||
|
|
||||||
| | | Android | iOS | tvOS | macOS* | Windows* | Web* | Expo* | | ||||||
| | :- | :-: | :-: | :-: | :-: | :-: | :-: | :-: | | ||||||
| | Audio/Video | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | - | :heavy_check_mark: | :heavy_check_mark: | | ||||||
| | Data Channels | :heavy_check_mark: | :heavy_check_mark: | - | - | - | :heavy_check_mark: | :heavy_check_mark: | | ||||||
| | Screen Capture | :heavy_check_mark: | :heavy_check_mark: | - | - | - | :heavy_check_mark: | :heavy_check_mark: | | ||||||
| | Plan B | - | - | - | - | - | - | - | | ||||||
| | Unified Plan* | :heavy_check_mark: | :heavy_check_mark: | - | - | - | :heavy_check_mark: | :heavy_check_mark: | | ||||||
| | Simulcast* | :heavy_check_mark: | :heavy_check_mark: | - | - | - | :heavy_check_mark: | :heavy_check_mark: | | ||||||
|
|
||||||
| > **macOS** - We don't currently actively support macOS at this time. | ||||||
| Support might return in the future. | ||||||
|
|
||||||
| > **Windows** - We don't currently support the [react-native-windows](https://github.com/microsoft/react-native-windows) platform at this time. | ||||||
| Anyone interested in getting the ball rolling? We're open to contributions. | ||||||
|
|
||||||
| > **Web** - The [react-native-webrtc-web-shim](https://github.com/react-native-webrtc/react-native-webrtc-web-shim) project provides a shim for [react-native-web](https://github.com/necolas/react-native-web) support. | ||||||
| Which will allow you to use [(almost)](https://github.com/react-native-webrtc/react-native-webrtc-web-shim/tree/main#setup) the exact same code in your [react-native-web](https://github.com/necolas/react-native-web) project as you would with [react-native](https://reactnative.dev/) directly. | ||||||
|
|
||||||
| > **Expo** - As this module includes native code it is not available in the [Expo Go](https://expo.dev/client) app by default. | ||||||
| However you can get things working via the [expo-dev-client](https://docs.expo.dev/development/getting-started/) library and out-of-tree [config-plugins/react-native-webrtc](https://github.com/expo/config-plugins/tree/master/packages/react-native-webrtc) package. | ||||||
|
|
||||||
| > **Unified Plan** - As of version 106.0.0 Unified Plan is the only supported mode. | ||||||
| Those still in need of Plan B will need to use an older release. | ||||||
|
|
||||||
| > **Simulcast** - As of version 111.0.0 Simulcast is now possible with ease. | ||||||
| Software encode/decode factories have been enabled by default. | ||||||
|
|
||||||
| ## WebRTC Revision | ||||||
|
|
||||||
| * Currently used revision: [M124](https://github.com/jitsi/webrtc/tree/M124) | ||||||
| * Supported architectures | ||||||
| * Android: armeabi-v7a, arm64-v8a, x86, x86_64 | ||||||
| * iOS: arm64, x86_64 | ||||||
| * tvOS: arm64 | ||||||
| * macOS: arm64, x86_64 | ||||||
| A WebRTC module for React Native tailored for the [`@stream-io/video-react-native-sdk`](https://github.com/GetStream/stream-video-js) needs. | ||||||
|
|
||||||
| ## Getting Started | ||||||
|
|
||||||
| Use one of the following preferred package install methods to immediately get going. | ||||||
| Don't forget to follow platform guides below to cover any extra required steps. | ||||||
| Don't forget to follow platform guides below to cover any extra required steps. | ||||||
|
|
||||||
| **npm:** `npm install react-native-webrtc --save` | ||||||
| **yarn:** `yarn add react-native-webrtc` | ||||||
| **pnpm:** `pnpm install react-native-webrtc` | ||||||
| **npm:** `npm install @stream-io/react-native-webrtc --save` | ||||||
| **yarn:** `yarn add @stream-io/react-native-webrtc` | ||||||
| **pnpm:** `pnpm install @stream-io/react-native-webrtc` | ||||||
|
|
||||||
| ## Guides | ||||||
|
|
||||||
|
|
@@ -68,18 +29,9 @@ Don't forget to follow platform guides below to cover any extra required steps. | |||||
| ## Example Projects | ||||||
|
|
||||||
| We have some very basic example projects included in the [examples](./examples) directory. | ||||||
| Don't worry, there are plans to include a much more broader example with backend included. | ||||||
|
|
||||||
| ## Community | ||||||
|
|
||||||
| Come join our [Discourse Community](https://react-native-webrtc.discourse.group/) if you want to discuss any React Native and WebRTC related topics. | ||||||
| Everyone is welcome and every little helps. | ||||||
|
|
||||||
| ## Picture-in-Picture (PIP) | ||||||
|
|
||||||
| This package does not include a built-in PIP implementation. PIP support is available via [`@stream-io/video-react-native-sdk`](https://github.com/GetStream/stream-video-js). | ||||||
| Don't worry, there are plans to include a much more broader example with backend included. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix grammatical error: "much more broader" is incorrect. The phrase "much more broader" uses a double comparative, which is grammatically incorrect. It should be either "much broader" or "a more comprehensive". 📝 Proposed fix-Don't worry, there are plans to include a much more broader example with backend included.
+Don't worry, there are plans to include a much broader example with backend included.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| ## Related Projects | ||||||
|
|
||||||
| Looking for extra functionality coverage? | ||||||
| The [react-native-webrtc](https://github.com/react-native-webrtc) organization provides a number of packages which are more than useful when developing Real Time Communication applications. | ||||||
| The [react-native-webrtc](https://github.com/react-native-webrtc) organization provides a number of packages which are more than useful when developing Real Time Communication applications. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add hyphen to compound adjective "Real Time Communication". When "Real Time" modifies "Communication" as a compound adjective, it should be hyphenated as "Real-Time Communication" for correct English grammar. 📝 Proposed fix-The [react-native-webrtc](https://github.com/react-native-webrtc) organization provides a number of packages which are more than useful when developing Real Time Communication applications.
+The [react-native-webrtc](https://github.com/react-native-webrtc) organization provides a number of packages which are more than useful when developing Real-Time Communication applications.📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[uncategorized] ~37-~37: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branch guard is more permissive than semantic-release configuration.
Line 19 uses
endsWith(github.ref_name, '.x'), which would allow branches liketest.xorfoo.x. However,.releaserc.jsonLine 3 expects numeric maintenance branches (1.x,2.x,1.0.x). This mismatch could allow releases from unintended branches.🔒 Proposed fix to align with semantic-release branch patterns
Or use a more precise regex check by adding a validation step before the release.
🤖 Prompt for AI Agents