From aa0765e425faba6c035a9933320e91679b167b80 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sun, 3 Mar 2024 01:18:03 -0800 Subject: [PATCH] chore: tune release packages (#856) * chore: tune release * tune name * adjust syntax --- .github/workflows/publish.js.yml | 19 +-------------- .github/workflows/wda-package.yml | 40 +++++++++++++++++++++---------- .releaserc | 6 +---- 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/.github/workflows/publish.js.yml b/.github/workflows/publish.js.yml index 92299e7a8..323ae7278 100644 --- a/.github/workflows/publish.js.yml +++ b/.github/workflows/publish.js.yml @@ -14,9 +14,7 @@ jobs: env: XCODE_VERSION: 14.3.1 - ZIP_PKG_NAME_IOS: "WebDriverAgentRunner-Runner.zip" PKG_PATH_IOS: "appium_wda_ios" - ZIP_PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner.zip" PKG_PATH_TVOS: "appium_wda_tvos" steps: @@ -35,7 +33,7 @@ jobs: - run: npm run test name: Run test - # building WDA packages + # building WDA packages to test package build - name: Build iOS run: | xcodebuild clean build-for-testing \ @@ -44,13 +42,6 @@ jobs: -scheme WebDriverAgentRunner \ -destination generic/platform=iOS \ CODE_SIGNING_ALLOWED=NO ARCHS=arm64 - - name: Creating a zip of WebDriverAgentRunner-Runner.app for iOS after removing test frameworks - run: | - pushd appium_wda_ios/Build/Products/Debug-iphoneos - rm -rf WebDriverAgentRunner-Runner.app/Frameworks/XC*.framework - zip -r $ZIP_PKG_NAME_IOS WebDriverAgentRunner-Runner.app - popd - mv $PKG_PATH_IOS/Build/Products/Debug-iphoneos/$ZIP_PKG_NAME_IOS ./ - name: Build tvOS run: | xcodebuild clean build-for-testing \ @@ -59,13 +50,6 @@ jobs: -scheme WebDriverAgentRunner_tvOS \ -destination generic/platform=tvOS \ CODE_SIGNING_ALLOWED=NO ARCHS=arm64 - - name: Creating a zip of WebDriverAgentRunner-Runner.app for tvOS after removing test frameworks - run: | - pushd appium_wda_tvos/Build/Products/Debug-appletvos - rm -rf WebDriverAgentRunner_tvOS-Runner.app/Frameworks/XC*.framework - zip -r $ZIP_PKG_NAME_TVOS WebDriverAgentRunner_tvOS-Runner.app - popd - mv $PKG_PATH_TVOS/Build/Products/Debug-appletvos/$ZIP_PKG_NAME_TVOS ./ # release tasks - run: npx semantic-release @@ -73,4 +57,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} name: Release - diff --git a/.github/workflows/wda-package.yml b/.github/workflows/wda-package.yml index b4b4223f2..2827b080f 100644 --- a/.github/workflows/wda-package.yml +++ b/.github/workflows/wda-package.yml @@ -2,10 +2,8 @@ name: Building WebDriverAgent on: workflow_dispatch: - workflow_run: - workflows: ["Release"] - types: - - completed + release: + types: [published] env: HOST: macos-13 @@ -56,14 +54,25 @@ jobs: WD: appium_wda_tvos/Build/Products/Debug-appletvos ZIP_PKG_NAME: "${{ env.ZIP_PKG_NAME_TVOS }}" - - name: Upload the built generic app package for iOS - uses: actions/upload-artifact@v3.1.0 + - name: upload WebDriverAgentRunner-Runner.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.token }} with: - path: "${{ env.ZIP_PKG_NAME_IOS }}" - - name: Upload the built generic app package for tvOS - uses: actions/upload-artifact@v3.1.0 + upload_url: ${{ github.event.release.upload_url }} + asset_path: "${{ env.ZIP_PKG_NAME_IOS }}" + asset_name: WebDriverAgentRunner-Runner.zip + asset_content_type: application/zip + + - name: upload WebDriverAgentRunner_tvOS-Runner.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.token }} with: - path: "${{ env.ZIP_PKG_NAME_TVOS }}" + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ env.ZIP_PKG_NAME_TVOS }}" + asset_name: WebDriverAgentRunner_tvOS-Runner.zip + asset_content_type: application/zip for_simulator_devices: needs: [host_machine] @@ -89,7 +98,12 @@ jobs: SCHEME: WebDriverAgentRunner${{ matrix.target }} ARCHS: ${{ matrix.arch }} ZIP_PKG_NAME: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip" - - name: Upload the built generic app package for WebDriverAgentRunner${{ matrix.target }} with ${{ matrix.arch }} - uses: actions/upload-artifact@v3.1.0 + - name: upload windows WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.token }} with: - path: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip" + upload_url: ${{ github.event.release.upload_url }} + asset_path: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip" + asset_name: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip" + asset_content_type: application/zip diff --git a/.releaserc b/.releaserc index 0cb17f220..631d1ee18 100644 --- a/.releaserc +++ b/.releaserc @@ -32,10 +32,6 @@ "assets": ["docs", "package.json", "CHANGELOG.md"], "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" }], - ["@semantic-release/github", { - "assets": [ - "WebDriverAgentRunner-Runner.zip", - "WebDriverAgentRunner_tvOS-Runner.zip" - ]}] + ["@semantic-release/github"] ] }