insider-macos.yml 2.8 KB

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