insider-spearhead.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. name: insider-spearhead
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. new_release:
  6. type: boolean
  7. description: Force new Release
  8. force_dispatch:
  9. type: boolean
  10. description: Force dispatch
  11. dont_update:
  12. type: boolean
  13. description: Don't update VSCode
  14. dont_dispatch:
  15. type: boolean
  16. description: Disable dispatch
  17. schedule:
  18. - cron: '0 7 * * *'
  19. jobs:
  20. build:
  21. runs-on: macos-14
  22. env:
  23. APP_NAME: VSCodium
  24. ASSETS_REPOSITORY: ${{ github.repository }}-insiders
  25. VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
  26. OS_NAME: osx
  27. VSCODE_ARCH: arm64
  28. VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }}
  29. VSCODE_QUALITY: insider
  30. steps:
  31. - uses: actions/checkout@v4
  32. with:
  33. ref: insider
  34. - name: Setup Node.js environment
  35. uses: actions/setup-node@v4
  36. with:
  37. node-version: '20.18.2'
  38. - name: Clone VSCode repo
  39. run: . get_repo.sh
  40. - name: Check existing VSCodium tags/releases
  41. env:
  42. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  43. NEW_RELEASE: ${{ github.event.inputs.new_release }}
  44. IS_SPEARHEAD: 'yes'
  45. run: . check_tags.sh
  46. - name: Build
  47. env:
  48. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  49. run: ./build.sh
  50. if: env.SHOULD_BUILD == 'yes'
  51. - name: Import GPG key
  52. uses: crazy-max/ghaction-import-gpg@v6
  53. with:
  54. gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
  55. passphrase: ${{ secrets.GPG_PASSPHRASE }}
  56. git_user_signingkey: true
  57. git_commit_gpgsign: true
  58. if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true'
  59. - name: Update upstream version
  60. run: ./update_upstream.sh
  61. if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true'
  62. - name: Prepare source
  63. run: ./prepare_src.sh
  64. if: env.SHOULD_BUILD == 'yes'
  65. - name: Release source
  66. env:
  67. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  68. GITHUB_USERNAME: ${{ github.repository_owner }}
  69. run: ./release.sh
  70. if: env.SHOULD_BUILD == 'yes'
  71. - name: Dispatch builds
  72. uses: peter-evans/repository-dispatch@v3
  73. with:
  74. event-type: 'insider'
  75. if: github.event.inputs.dont_dispatch != 'true' && (env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true')