stable-spearhead.yml 2.4 KB

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