linux.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. name: linux_build
  2. on:
  3. schedule:
  4. - cron: '0 0 * * *'
  5. push:
  6. pull_request:
  7. branches: [ master ]
  8. jobs:
  9. linux:
  10. runs-on: ubuntu-latest
  11. container: ${{ matrix.image }}
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. vscode_arch: [x64, arm64, armhf]
  16. include:
  17. - vscode_arch: x64
  18. npm_arch: x64
  19. image: vscodium/vscodium-linux-build-agent:x64
  20. - vscode_arch: arm64
  21. npm_arch: arm64
  22. image: vscodium/vscodium-linux-build-agent:buster-arm64
  23. - vscode_arch: armhf
  24. npm_arch: armv7l
  25. image: vscodium/vscodium-linux-build-agent:buster-armhf
  26. env:
  27. OS_NAME: 'linux'
  28. VSCODE_ARCH: ${{ matrix.vscode_arch }}
  29. steps:
  30. - uses: actions/checkout@v2
  31. - name: Setup Node.js environment
  32. uses: actions/setup-node@v1.4.3
  33. with:
  34. node-version: 12.14.1
  35. - name: Clone VSCode repo
  36. run: |
  37. . get_repo.sh
  38. echo "::set-env name=LATEST_MS_TAG::$LATEST_MS_TAG"
  39. echo "::set-env name=LATEST_MS_COMMIT::$LATEST_MS_COMMIT"
  40. - name: Check existing VSCodium tags/releases
  41. env:
  42. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  43. run: |
  44. . check_tags.sh
  45. echo "::set-env name=SHOULD_BUILD::$SHOULD_BUILD"
  46. - name: Build
  47. env:
  48. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  49. npm_config_arch: ${{ matrix.npm_arch }}
  50. run: ./build.sh
  51. if: env.SHOULD_BUILD == 'yes'
  52. - name: Zip release
  53. run: |
  54. cd VSCode-linux-${VSCODE_ARCH}
  55. tar czf ../VSCodium-linux-${VSCODE_ARCH}-${LATEST_MS_TAG}.tar.gz .
  56. if: env.SHOULD_BUILD == 'yes'
  57. - name: Generate shasums
  58. run: ./sum.sh
  59. if: env.SHOULD_BUILD == 'yes'
  60. - name: Release
  61. uses: softprops/action-gh-release@v1
  62. if: env.SHOULD_BUILD == 'yes'
  63. with:
  64. tag_name: ${{ env.LATEST_MS_TAG }}
  65. files: |
  66. ./*.sha256
  67. ./*.zip
  68. ./*.tar.gz
  69. ./*.deb
  70. ./*.rpm
  71. ./*.AppImage
  72. ./*.AppImage.zsync
  73. env:
  74. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  75. - name: Update versions repo
  76. if: env.SHOULD_BUILD == 'yes'
  77. run: ./update_version.sh
  78. env:
  79. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  80. GITHUB_USERNAME: ${{ github.repository_owner }}