publish.js.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
  3. name: Release
  4. on:
  5. workflow_dispatch:
  6. push:
  7. branches: [ master ]
  8. jobs:
  9. build:
  10. runs-on: macos-12
  11. env:
  12. XCODE_VERSION: 14.2
  13. ZIP_PKG_NAME_IOS: "WebDriverAgentRunner-Runner.zip"
  14. PKG_PATH_IOS: "appium_wda_ios"
  15. ZIP_PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner.zip"
  16. PKG_PATH_TVOS: "appium_wda_tvos"
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Use Node.js
  20. uses: actions/setup-node@v3
  21. with:
  22. node-version: lts/*
  23. - uses: maxim-lobanov/setup-xcode@v1
  24. with:
  25. xcode-version: "${{ env.XCODE_VERSION }}"
  26. - run: npm install --no-package-lock
  27. name: Install dev dependencies
  28. - run: npm run build
  29. name: Run build
  30. - run: npm run test
  31. name: Run test
  32. # building WDA packages
  33. - name: Build iOS
  34. run: |
  35. xcodebuild clean build-for-testing \
  36. -project WebDriverAgent.xcodeproj \
  37. -derivedDataPath $PKG_PATH_IOS \
  38. -scheme WebDriverAgentRunner \
  39. -destination generic/platform=iOS \
  40. CODE_SIGNING_ALLOWED=NO ARCHS=arm64
  41. - name: Creating a zip of WebDriverAgentRunner-Runner.app for iOS
  42. run: |
  43. pushd appium_wda_ios/Build/Products/Debug-iphoneos
  44. zip -r $ZIP_PKG_NAME_IOS WebDriverAgentRunner-Runner.app
  45. popd
  46. mv $PKG_PATH_IOS/Build/Products/Debug-iphoneos/$ZIP_PKG_NAME_IOS ./
  47. - name: Build tvOS
  48. run: |
  49. xcodebuild clean build-for-testing \
  50. -project WebDriverAgent.xcodeproj \
  51. -derivedDataPath $PKG_PATH_TVOS \
  52. -scheme WebDriverAgentRunner_tvOS \
  53. -destination generic/platform=tvOS \
  54. CODE_SIGNING_ALLOWED=NO ARCHS=arm64
  55. - name: Creating a zip of WebDriverAgentRunner-Runner.app for tvOS
  56. run: |
  57. pushd appium_wda_tvos/Build/Products/Debug-appletvos
  58. zip -r $ZIP_PKG_NAME_TVOS WebDriverAgentRunner_tvOS-Runner.app
  59. popd
  60. mv $PKG_PATH_TVOS/Build/Products/Debug-appletvos/$ZIP_PKG_NAME_TVOS ./
  61. # release tasks
  62. - run: npx semantic-release
  63. env:
  64. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  65. NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  66. name: Release