build-tag.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ---
  2. name: "Build Tag"
  3. on:
  4. push:
  5. tags:
  6. - '*'
  7. jobs:
  8. build-tag:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v3
  13. with:
  14. fetch-depth: 0
  15. - name: Set up QEMU
  16. id: qemu
  17. uses: docker/setup-qemu-action@v2
  18. with:
  19. image: tonistiigi/binfmt:latest
  20. platforms: arm64,arm
  21. - name: Setup node
  22. uses: actions/setup-node@v3
  23. with:
  24. cache: 'npm'
  25. cache-dependency-path: webui/package-lock.json
  26. - name: Setup Go
  27. uses: actions/setup-go@v3
  28. with:
  29. go-version: '^1.18.0'
  30. cache: true
  31. - name: Login to Docker Hub
  32. uses: docker/login-action@v2
  33. with:
  34. username: ${{ secrets.DOCKERHUB_USERNAME }}
  35. password: ${{ secrets.DOCKERHUB_KEY }}
  36. - name: Login to ghcr
  37. uses: docker/login-action@v2
  38. with:
  39. registry: ghcr.io
  40. username: ${{ github.actor }}
  41. password: ${{ secrets.CONTAINER_TOKEN }}
  42. - name: grpc
  43. run: make grpc
  44. - name: goreleaser
  45. uses: goreleaser/goreleaser-action@v4.2.0
  46. with:
  47. distribution: goreleaser
  48. version: latest
  49. args: release --clean --parallelism 1
  50. env:
  51. GITHUB_TOKEN: ${{ secrets.CONTAINER_TOKEN }}
  52. - name: Archive binaries
  53. uses: actions/upload-artifact@v2
  54. with:
  55. name: dist
  56. path: dist/OliveTin*.*
  57. - name: Archive integration tests
  58. uses: actions/upload-artifact@v2
  59. with:
  60. name: integration-tests
  61. path: integration-tests