chore: release 2.9.1 (#296) #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - VERSION | |
| permissions: | |
| contents: write | |
| id-token: write # Required for npm OIDC trusted publishing | |
| jobs: | |
| react-tests: | |
| name: Run React Native Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: yarn | |
| cache-dependency-path: yarn.lock | |
| - name: Install node modules | |
| run: yarn install | |
| - name: Run tests | |
| run: yarn test | |
| android-unit-tests: | |
| name: Run Android Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run Android Unit Tests | |
| run: cd android && ./gradlew test | |
| publish: | |
| name: Publish to npm and Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: [react-tests, android-unit-tests] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Read version from VERSION | |
| id: version | |
| run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| cache: yarn | |
| cache-dependency-path: yarn.lock | |
| - name: Install node modules | |
| run: yarn install | |
| - name: Build SDK | |
| run: yarn build | |
| - name: Ensure npm CLI supports OIDC | |
| run: npm install -g npm@latest | |
| - name: Extract release notes from CHANGELOG.md | |
| id: release-notes | |
| uses: ffurrer2/extract-release-notes@273da39a24fb7db106a35526c8162815faffd31d | |
| with: | |
| release_notes_file: RELEASE_NOTES.md | |
| - name: Publish to npm | |
| run: npm publish --provenance | |
| - name: Create GitHub Release | |
| uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd | |
| with: | |
| tag: ${{ steps.version.outputs.version }} | |
| name: ${{ steps.version.outputs.version }} | |
| bodyFile: RELEASE_NOTES.md | |
| commit: ${{ github.sha }} |