windows.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. name: windows_build
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. new_release:
  6. type: boolean
  7. description: Force new Release
  8. schedule:
  9. - cron: '0 0 * * *'
  10. push:
  11. branches: [ master ]
  12. pull_request:
  13. branches: [ master ]
  14. jobs:
  15. windows:
  16. runs-on: windows-2019
  17. defaults:
  18. run:
  19. shell: bash
  20. env:
  21. VSCODE_ARCH: ${{ matrix.vscode_arch }}
  22. OS_NAME: 'windows'
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. vscode_arch:
  27. - x64
  28. - ia32
  29. - arm64
  30. steps:
  31. - uses: actions/checkout@v3
  32. - name: Setup Node.js environment
  33. uses: actions/setup-node@v3
  34. with:
  35. node-version: 16
  36. - name: Install Yarn
  37. run: npm install -g yarn
  38. - name: Setup Python 3
  39. uses: actions/setup-python@v3
  40. with:
  41. python-version: '3.x'
  42. - name: Clone VSCode repo
  43. run: ./get_repo.sh
  44. - name: Check PR or cron
  45. run: ./check_cron_or_pr.sh
  46. - name: Check existing VSCodium tags/releases
  47. env:
  48. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  49. NEW_RELEASE: ${{ github.event.inputs.new_release }}
  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. npm_config_arch: ${{ matrix.vscode_arch }}
  71. npm_config_target_arch: ${{ matrix.vscode_arch }}
  72. run: ./build.sh
  73. if: env.SHOULD_BUILD == 'yes'
  74. - name: Prepare artifacts
  75. run: ./prepare_artifacts.sh
  76. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  77. - name: Release
  78. env:
  79. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  80. run: ./release.sh
  81. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  82. - name: Update versions repo
  83. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  84. run: ./update_version.sh
  85. env:
  86. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  87. GITHUB_USERNAME: ${{ github.repository_owner }}
  88. # - name: Set MS_TAG as job output for release-winget job
  89. # if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  90. # run: echo "::set-output name=tagname::${{ env.MS_TAG }}"
  91. # release-winget:
  92. # name: Release to WinGet
  93. # needs: windows
  94. # if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  95. # runs-on: windows-latest # action can only be run on windows
  96. # steps:
  97. # - name: Release to WinGet
  98. # uses: vedantmgoyal2009/winget-releaser@latest
  99. # with:
  100. # identifier: VSCodium.VSCodium
  101. # release-tag: ${{ needs.windows.outputs.tagname }}
  102. # installers-regex: '\.exe$' # only .exe files
  103. # token: ${{ secrets.STRONGER_GITHUB_TOKEN }}