diff --git a/.github/workflows/release_apps.yml b/.github/workflows/release_apps.yml new file mode 100644 index 000000000..75aa18b2e --- /dev/null +++ b/.github/workflows/release_apps.yml @@ -0,0 +1,74 @@ +name: Release Apps + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +on: + workflow_dispatch: + push: + branches: + - develop + +permissions: + checks: write + contents: read + +jobs: + release_android_app: + name: Release Android App + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: zulu + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 16 + + - name: Create Release APK + run: | + cd ./packages/react-native-hms + npm install + cd ../react-native-room-kit + npm install + cd ./example + npm install + cd ./android + chmod +x ./gradlew + ./gradlew assembleRelease + + - name: Upload artifact to Firebase App Distribution + uses: wzieba/Firebase-Distribution-Github-Action@v1 + with: + appId: ${{ secrets.FIREBASE_APP_ID }} + serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} + groups: internal, External + releaseNotesFile: ./packages/react-native-room-kit/example/ExampleAppChangelog.txt + file: ./packages/react-native-room-kit/example/android/app/build/outputs/apk/release/app-release.apk + + - name: Extract Branch Name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Post Slack Notification + uses: rtCamp/action-slack-notify@v2.2.1 + env: + SLACK_CHANNEL: dogfooding + SLACK_COLOR: ${{ job.status }} + SLACK_ICON_EMMOJI: ":react:" + SLACK_USERNAME: React Native Bot + SLACK_WEBHOOK: ${{ secrets.SLACK_URL }} + SLACK_TITLE: ":react: 🎉 React Native Android App released! 🎊 :react:" + SLACK_MESSAGE: 📝 Changelog 🔗 https://github.com/100mslive/100ms-react-native/blob/${{ steps.extract_branch.outputs.branch }}/packages/react-native-room-kit/example/ExampleAppChangelog.txt + SLACK_FOOTER: 🤖 Download from Firebase 👉 https://appdistribution.firebase.dev/i/7b7ab3b30e627c35 diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml new file mode 100644 index 000000000..19ff70095 --- /dev/null +++ b/.github/workflows/trunk-check.yml @@ -0,0 +1,22 @@ +name: Pull Request +on: [pull_request] +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: read-all + +jobs: + trunk_check: + name: Trunk Check Runner + runs-on: ubuntu-latest + permissions: + checks: write + contents: read + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Trunk Check + uses: trunk-io/trunk-action@v1.1.9 diff --git a/release-apps.sh b/release-apps.sh index a7ee1bb71..3d3b66fdb 100644 --- a/release-apps.sh +++ b/release-apps.sh @@ -59,7 +59,6 @@ perform_npm_actions P1=$! wait $P1 - release_android & P2=$!