stable-spearhead.yml 2.3 KB

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