build-tag.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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@v4
  13. with:
  14. fetch-depth: 0
  15. - name: Set up QEMU
  16. id: qemu
  17. uses: docker/setup-qemu-action@v3
  18. with:
  19. image: tonistiigi/binfmt:latest
  20. platforms: arm64,arm
  21. - name: Setup node
  22. uses: actions/setup-node@v4
  23. with:
  24. cache: 'npm'
  25. cache-dependency-path: webui.dev/package-lock.json
  26. - name: Setup Go
  27. uses: actions/setup-go@v5
  28. with:
  29. go-version-file: 'go.mod'
  30. cache: true
  31. - name: Print go version
  32. run: go version
  33. - name: Login to Docker Hub
  34. uses: docker/login-action@v3
  35. with:
  36. username: ${{ secrets.DOCKERHUB_USERNAME }}
  37. password: ${{ secrets.DOCKERHUB_KEY }}
  38. - name: Login to ghcr
  39. uses: docker/login-action@v3
  40. with:
  41. registry: ghcr.io
  42. username: ${{ github.actor }}
  43. password: ${{ secrets.CONTAINER_TOKEN }}
  44. - name: grpc
  45. run: make -w grpc
  46. - name: make webui
  47. run: make -w webui-dist
  48. - name: goreleaser
  49. uses: goreleaser/goreleaser-action@v6
  50. with:
  51. distribution: goreleaser
  52. version: latest
  53. args: release --clean --parallelism 1
  54. env:
  55. GITHUB_TOKEN: ${{ secrets.CONTAINER_TOKEN }}
  56. - name: Archive binaries
  57. uses: actions/upload-artifact@v4.3.1
  58. with:
  59. name: "OliveTin-${{ github.ref_name }}"
  60. path: dist/OliveTin*.*
  61. - name: Archive integration tests
  62. uses: actions/upload-artifact@v4.3.1
  63. with:
  64. name: integration-tests
  65. path: |
  66. integration-tests
  67. !integration-tests/node_modules