insider-macos.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. name: insider-macos
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. release_version:
  6. type: string
  7. description: Forced release version
  8. schedule:
  9. - cron: '0 7 * * *'
  10. push:
  11. branches: [ insider ]
  12. paths-ignore:
  13. - '**/*.md'
  14. pull_request:
  15. branches: [ insider ]
  16. paths-ignore:
  17. - '**/*.md'
  18. jobs:
  19. build:
  20. runs-on: ${{ matrix.runner }}
  21. env:
  22. OS_NAME: 'osx'
  23. VSCODE_ARCH: ${{ matrix.vscode_arch }}
  24. VSCODE_QUALITY: 'insider'
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. include:
  29. - runner: macos-12
  30. vscode_arch: x64
  31. - runner: [self-hosted, macOS, ARM64]
  32. vscode_arch: arm64
  33. steps:
  34. - uses: actions/checkout@v3
  35. with:
  36. ref: insider
  37. - name: Setup Node.js environment
  38. uses: actions/setup-node@v3
  39. with:
  40. node-version: 16
  41. - name: Clone VSCode repo
  42. env:
  43. RELEASE_VERSION: ${{ github.event.inputs.release_version }}
  44. run: . get_repo.sh
  45. - name: Check PR or cron
  46. run: . check_cron_or_pr.sh
  47. - name: Check existing VSCodium tags/releases
  48. env:
  49. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  50. run: . check_tags.sh
  51. if: env.SHOULD_DEPLOY == 'yes'
  52. - name: Compute cache key
  53. id: yarnCacheKey
  54. run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)"
  55. if: env.SHOULD_BUILD == 'yes'
  56. - name: Get yarn cache directory path
  57. id: yarnCacheDirPath
  58. run: echo "::set-output name=dir::$(yarn cache dir)"
  59. if: env.SHOULD_BUILD == 'yes'
  60. - name: Cache yarn directory
  61. uses: actions/cache@v3
  62. with:
  63. path: ${{ steps.yarnCacheDirPath.outputs.dir }}
  64. key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
  65. restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-
  66. if: env.SHOULD_BUILD == 'yes'
  67. - name: Build
  68. env:
  69. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  70. run: ./build.sh
  71. if: env.SHOULD_BUILD == 'yes'
  72. - name: Prepare artifacts
  73. env:
  74. CERTIFICATE_OSX_P12: ${{ secrets.CERTIFICATE_OSX_P12 }}
  75. CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
  76. CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
  77. run: ./prepare_artifacts.sh
  78. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  79. - name: Release
  80. env:
  81. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  82. run: ./release.sh
  83. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  84. - name: Update versions repo
  85. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  86. run: ./update_version.sh
  87. env:
  88. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  89. GITHUB_USERNAME: ${{ github.repository_owner }}
  90. - name: Clean up keychain
  91. if: always()
  92. run: |
  93. KEYCHAIN=$RUNNER_TEMP/build.keychain
  94. if [ -f "$KEYCHAIN" ];
  95. then
  96. security delete-keychain $KEYCHAIN
  97. fi