build_binaries.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Build Binaries
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. push:
  7. tags:
  8. - '[0-9]+.[0-9]+.[0-9]+'
  9. pull_request:
  10. branches: [ main ]
  11. paths:
  12. - '.github/workflows/build_binaries.yml'
  13. - 'Makefile'
  14. - 'go.mod'
  15. - 'go.sum'
  16. - '**.go'
  17. jobs:
  18. build:
  19. name: Build
  20. if: github.repository_owner == 'miniflux'
  21. runs-on: ubuntu-latest
  22. steps:
  23. - name: Checkout
  24. uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  25. with:
  26. persist-credentials: false
  27. - name: Set up Golang
  28. uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
  29. with:
  30. go-version: stable
  31. check-latest: true
  32. cache: false
  33. - name: Compile binaries
  34. env:
  35. CGO_ENABLED: 0
  36. run: make build
  37. - name: Upload binaries
  38. if: github.event_name != 'pull_request'
  39. uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
  40. with:
  41. name: binaries
  42. path: miniflux-*
  43. if-no-files-found: error
  44. retention-days: 5