rpm_packages.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: RPM Packages
  2. permissions:
  3. contents: read
  4. on:
  5. workflow_dispatch:
  6. push:
  7. tags:
  8. - '[0-9]+.[0-9]+.[0-9]+'
  9. schedule:
  10. - cron: '0 0 * * 1,4' # Runs at 00:00 UTC on Monday and Thursday
  11. pull_request:
  12. branches: [ main ]
  13. paths:
  14. - 'packaging/rpm/**' # Only run on changes to the rpm packaging files
  15. - '.github/workflows/rpm_packages.yml'
  16. jobs:
  17. test-package:
  18. if: (github.event_name == 'schedule' && github.repository_owner == 'miniflux')
  19. || github.event_name == 'pull_request'
  20. name: Test Packages
  21. runs-on: ubuntu-latest
  22. steps:
  23. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  24. with:
  25. persist-credentials: false
  26. fetch-depth: 0
  27. - name: Build RPM Package
  28. run: make rpm VERSION=2.2.x_dev
  29. - name: List generated files
  30. run: ls -l *.rpm
  31. build-package-manually:
  32. if: github.event_name == 'workflow_dispatch'
  33. name: Build Packages Manually
  34. runs-on: ubuntu-latest
  35. steps:
  36. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  37. with:
  38. persist-credentials: false
  39. fetch-depth: 0
  40. - name: Build RPM Package
  41. run: make rpm
  42. - name: Upload package
  43. uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
  44. with:
  45. name: packages
  46. path: "*.rpm"
  47. if-no-files-found: error
  48. retention-days: 3
  49. publish-package:
  50. if: github.event_name == 'push' && github.repository_owner == 'miniflux'
  51. name: Publish Packages
  52. runs-on: ubuntu-latest
  53. environment: release
  54. steps:
  55. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  56. with:
  57. persist-credentials: false
  58. fetch-depth: 0
  59. - name: Build RPM Package
  60. run: make rpm
  61. - name: List generated files
  62. run: ls -l *.rpm
  63. - name: Upload package to repository
  64. env:
  65. FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
  66. run: for f in *.rpm; do curl -F package=@"$f" https://$FURY_TOKEN@push.fury.io/miniflux/; done