ci: add @release-it/bumper
#27
This file contains 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: Build Plugin | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- main | |
tags: | |
- v*.*.** | |
pull_request: | |
branches: | |
- master | |
- main | |
- release/* | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
env: | |
SDK_ROOT: Android-SDK@3.6.18.81676_20230117 | |
steps: | |
- name: Download unzip | |
run: | | |
wget https://download.agora.io/sdk/release/uni-app-sdk-android.zip | |
unzip uni-app-sdk-android.zip | |
- uses: actions/checkout@v3 | |
with: | |
path: Agora-Uniapp-SDK | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Modify settings.gradle | |
run: | | |
echo "include ':uniplugin_agora_rtc'" >> settings.gradle | |
echo "project(':uniplugin_agora_rtc').projectDir = new File('../../Agora-Uniapp-SDK', 'android')" >> settings.gradle | |
working-directory: ${{ env.SDK_ROOT }}/UniPlugin-Hello-AS | |
- name: Gradle build | |
run: | | |
sh gradlew :uniplugin_agora_rtc:assembleRelease | |
working-directory: ${{ env.SDK_ROOT }}/UniPlugin-Hello-AS | |
- name: Archive | |
run: | | |
cp -rp android/build/outputs/aar/*.aar package/Agora-RTC/android/ | |
working-directory: Agora-Uniapp-SDK | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: Agora-RTC | |
files: | | |
Agora-Uniapp-SDK/package/Agora-RTC/*/*.aar | |
- uses: actions/upload-artifact@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
name: Agora-RTC | |
path: | | |
Agora-Uniapp-SDK/package/Agora-RTC/*/*.aar | |
build-ios: | |
runs-on: macos-latest | |
env: | |
SDK_ROOT: SDK | |
steps: | |
- name: Download unzip | |
run: | | |
wget https://download.agora.io/sdk/release/uni-app-sdk-ios.zip | |
unzip uni-app-sdk-ios.zip | |
- uses: actions/checkout@v3 | |
with: | |
path: Agora-Uniapp-SDK | |
- name: Modify Podfile | |
run: | | |
pod init | |
sed "s/# Pods for .*/pod 'AgoraRtcUniPlugin', :path => '\.\.\/\.\.\/Agora-Uniapp-SDK\/ios'/g" Podfile > tmp | |
mv tmp Podfile | |
working-directory: ${{ env.SDK_ROOT }}/HBuilder-uniPluginDemo | |
- name: Xcodebuild build | |
run: | | |
pod install | |
xcodebuild -workspace ./HBuilder-uniPlugin.xcworkspace -scheme AgoraRtcUniPlugin -sdk iphoneos -configuration "Release" build | |
working-directory: ${{ env.SDK_ROOT }}/HBuilder-uniPluginDemo | |
- name: Archive | |
run: | | |
cp -rp ../${{ env.SDK_ROOT }}/HBuilder-uniPluginDemo/Pods/AgoraRtcEngine_Special_iOS/*.xcframework package/Agora-RTC/ios/ | |
cp -rp ~/Library/Developer/Xcode/DerivedData/*/Build/Products/Release-iphoneos/AgoraRtcUniPlugin/AgoraRtcUniPlugin.framework package/Agora-RTC/ios/ | |
working-directory: Agora-Uniapp-SDK | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: Agora-RTC | |
files: | | |
Agora-Uniapp-SDK/package/Agora-RTC/*/*.framework | |
Agora-Uniapp-SDK/package/Agora-RTC/*/*.xcframework | |
!Agora-Uniapp-SDK/package/Agora-RTC/*/*Extension.xcframework | |
- uses: actions/upload-artifact@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
name: Agora-RTC | |
path: | | |
Agora-Uniapp-SDK/package/Agora-RTC/*/*.framework | |
Agora-Uniapp-SDK/package/Agora-RTC/*/*.xcframework | |
!Agora-Uniapp-SDK/package/Agora-RTC/*/*Extension.xcframework | |
build-ts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- run: yarn | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: Agora-RTC | |
files: | | |
package/Agora-RTC/package.json | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: Agora-RTC-JS | |
files: | | |
lib/module/ | |
- uses: actions/upload-artifact@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
name: Agora-RTC | |
path: | | |
package/Agora-RTC/package.json | |
- uses: actions/upload-artifact@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
with: | |
name: Agora-RTC-JS | |
path: | | |
lib/module/ |