windows.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. name: windows_build
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: '0 0 * * *'
  6. push:
  7. pull_request:
  8. branches: [ master ]
  9. jobs:
  10. windows:
  11. runs-on: windows-2019
  12. defaults:
  13. run:
  14. shell: bash
  15. env:
  16. VSCODE_ARCH: ${{ matrix.vscode_arch }}
  17. OS_NAME: 'windows'
  18. strategy:
  19. fail-fast: false
  20. matrix:
  21. vscode_arch: [x64, ia32, arm64]
  22. steps:
  23. - uses: actions/checkout@v3
  24. - name: Setup Node.js environment
  25. uses: actions/setup-node@v3
  26. with:
  27. node-version: 16
  28. - name: Install Yarn
  29. run: npm install -g yarn
  30. - name: Setup Python 2
  31. uses: actions/setup-python@v3
  32. with:
  33. python-version: '2.x'
  34. - name: Clone VSCode repo
  35. run: ./get_repo.sh
  36. - name: Check PR or cron
  37. run: ./check_cron_or_pr.sh
  38. - name: Check existing VSCodium tags/releases
  39. env:
  40. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  41. run: ./check_tags.sh
  42. if: env.SHOULD_DEPLOY == 'yes'
  43. - name: Compute cache key
  44. id: yarnCacheKey
  45. run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)"
  46. if: env.SHOULD_BUILD == 'yes'
  47. - name: Get yarn cache directory path
  48. id: yarnCacheDirPath
  49. run: echo "::set-output name=dir::$(yarn cache dir)"
  50. if: env.SHOULD_BUILD == 'yes'
  51. - name: Cache yarn directory
  52. uses: actions/cache@v3
  53. with:
  54. path: ${{ steps.yarnCacheDirPath.outputs.dir }}
  55. key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
  56. restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-
  57. if: env.SHOULD_BUILD == 'yes'
  58. - name: Build
  59. env:
  60. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  61. npm_config_arch: ${{ matrix.vscode_arch }}
  62. npm_config_target_arch: ${{ matrix.vscode_arch }}
  63. run: ./build.sh
  64. if: env.SHOULD_BUILD == 'yes'
  65. - name: Prepare artifacts
  66. run: ./prepare_artifacts.sh
  67. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  68. - name: Release
  69. env:
  70. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  71. run: ./release.sh
  72. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  73. - name: Update versions repo
  74. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  75. run: ./update_version.sh
  76. env:
  77. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  78. GITHUB_USERNAME: ${{ github.repository_owner }}