release.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: release
  2. on:
  3. push:
  4. tags:
  5. - 'v[0-9]+.[0-9]+.[0-9]+'
  6. jobs:
  7. release:
  8. runs-on: ubuntu-latest
  9. steps:
  10. -
  11. name: Install Go
  12. uses: actions/setup-go@v2
  13. with:
  14. go-version: '1.18.x'
  15. -
  16. name: Install node
  17. uses: actions/setup-node@v2
  18. with:
  19. node-version: '17'
  20. -
  21. name: Checkout code
  22. uses: actions/checkout@v2
  23. -
  24. name: Cache Go and npm modules
  25. uses: actions/cache@v3
  26. with:
  27. path: |
  28. ~/go/pkg/mod
  29. ~/go/bin
  30. ~/.npm
  31. web/node_modules
  32. key: ${{ runner.os }}-ntfy-${{ hashFiles('**/go.sum', '**/package.lock') }}
  33. restore-keys: ${{ runner.os }}-ntfy-
  34. -
  35. name: Docker login
  36. uses: docker/login-action@v2
  37. with:
  38. username: ${{ github.repository_owner }}
  39. password: ${{ secrets.DOCKER_HUB_TOKEN }}
  40. -
  41. name: Install dependencies
  42. run: make build-deps-ubuntu
  43. -
  44. name: Build and publish
  45. run: make release
  46. env:
  47. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  48. -
  49. name: Print build results and checksums
  50. run: make cli-build-results