build-snapshot.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ---
  2. name: "Build Snapshot"
  3. on:
  4. - push
  5. - workflow_dispatch
  6. jobs:
  7. build-snapshot:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout
  11. uses: actions/checkout@v3
  12. with:
  13. fetch-depth: 0
  14. - name: Set up QEMU
  15. id: qemu
  16. uses: docker/setup-qemu-action@v2
  17. with:
  18. image: tonistiigi/binfmt:latest
  19. platforms: arm64,arm
  20. - name: Setup node
  21. uses: actions/setup-node@v3
  22. with:
  23. cache: 'npm'
  24. cache-dependency-path: webui/package-lock.json
  25. - name: Setup Go
  26. uses: actions/setup-go@v3
  27. with:
  28. go-version: '^1.18.0'
  29. cache: true
  30. - name: grpc
  31. run: make grpc
  32. - name: make daemon
  33. run: make daemon-compile-x64-lin
  34. - name: unit tests
  35. run: make daemon-unittests
  36. - name: integration tests
  37. uses: cypress-io/github-action@v6
  38. with:
  39. start: ./../OliveTin
  40. working-directory: integration-tests
  41. - name: goreleaser
  42. uses: goreleaser/goreleaser-action@v4.2.0
  43. with:
  44. distribution: goreleaser
  45. version: latest
  46. args: release --snapshot --clean --parallelism 1 --skip-docker
  47. - name: Archive binaries
  48. uses: actions/upload-artifact@v3.1.0
  49. with:
  50. name: "OliveTin-snapshot-${{ github.sha }}-dist"
  51. path: dist/OliveTin*.*
  52. - name: Archive integration tests
  53. uses: actions/upload-artifact@v3.1.0
  54. with:
  55. name: integration-tests
  56. path: integration-tests