Skip to content

Commit

Permalink
ci: add release
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed Jun 7, 2023
1 parent 6d71d64 commit 2da3339
Showing 1 changed file with 18 additions and 34 deletions.
52 changes: 18 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,9 @@ jobs:
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' }}
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') }}
with:
name: Agora-RTC
path: |
Expand Down Expand Up @@ -101,17 +94,8 @@ jobs:
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' }}
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') }}
with:
name: Agora-RTC
path: |
Expand All @@ -129,31 +113,31 @@ jobs:
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' }}
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') }}
with:
name: Agora-RTC
path: |
package/Agora-RTC/package.json
- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'workflow_dispatch' }}
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') }}
with:
name: Agora-RTC-JS
path: |
lib/module/
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [build-android, build-ios, build-ts]
steps:
- uses: download-artifact@v3

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
Agora-RTC.zip
Agora-RTC-JS.zip

0 comments on commit 2da3339

Please sign in to comment.