|
| 1 | +name: RPM and Debian Packages |
| 2 | +permissions: read-all |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + pull_request: |
| 6 | + branches: [ main ] |
| 7 | + paths: |
| 8 | + - 'packaging/**' # Only run on changes to the packaging files |
| 9 | +jobs: |
| 10 | + build-packages: |
| 11 | + name: Build Packages |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v5 |
| 15 | + with: |
| 16 | + fetch-depth: 0 |
| 17 | + - name: Set up Golang |
| 18 | + uses: actions/setup-go@v5 |
| 19 | + with: |
| 20 | + go-version: stable |
| 21 | + - name: Run GoReleaser |
| 22 | + uses: goreleaser/goreleaser-action@v6 |
| 23 | + with: |
| 24 | + version: '~> v2' |
| 25 | + args: release -f packaging/goreleaser.yaml --clean ${{ github.event_name == 'pull_request' && '--snapshot' || '' }} |
| 26 | + env: |
| 27 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + - name: Upload Artifacts |
| 29 | + uses: actions/upload-artifact@v4 |
| 30 | + with: |
| 31 | + name: packages |
| 32 | + path: | |
| 33 | + dist/*.deb |
| 34 | + dist/*.rpm |
| 35 | + if-no-files-found: error |
| 36 | + retention-days: 1 |
| 37 | + compression-level: 0 |
| 38 | + test-debian-package: |
| 39 | + name: Test Debian Package |
| 40 | + runs-on: ubuntu-latest |
| 41 | + needs: build-packages |
| 42 | + steps: |
| 43 | + - name: Download Artifacts |
| 44 | + uses: actions/download-artifact@v4 |
| 45 | + with: |
| 46 | + name: packages |
| 47 | + path: dist/ |
| 48 | + - name: Install Debian Package |
| 49 | + run: | |
| 50 | + sudo apt-get update |
| 51 | + sudo dpkg -i dist/miniflux*amd64.deb |
| 52 | + - name: Test Installation |
| 53 | + run: | |
| 54 | + which miniflux |
| 55 | + miniflux -i |
| 56 | + - name: Test Systemd Service |
| 57 | + run: | |
| 58 | + # Verify service file exists and is properly installed |
| 59 | + systemctl cat miniflux |
| 60 | +
|
| 61 | + # Check if service is enabled by default |
| 62 | + sudo systemctl is-enabled miniflux || echo "Service not enabled by default" |
| 63 | +
|
| 64 | + # Check service status (should be inactive/dead but loadable) |
| 65 | + sudo systemctl status miniflux --no-pager || true |
| 66 | +
|
| 67 | + # Verify service can be started (will fail due to missing config, but should load) |
| 68 | + sudo systemctl start miniflux || echo "Service failed to start (expected without proper config)" |
| 69 | +
|
| 70 | + # Check if service is properly defined |
| 71 | + systemctl show miniflux --property=Type,ExecStart,User,Group --no-pager |
0 commit comments