2023-08-10 05:26:57 +02:00
|
|
|
name: RPM Packages
|
|
|
|
permissions: read-all
|
|
|
|
on:
|
2024-02-22 05:25:01 +01:00
|
|
|
workflow_dispatch:
|
2023-08-10 05:26:57 +02:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
test-package:
|
|
|
|
if: github.event.pull_request
|
|
|
|
name: Test Packages
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 00:35:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-10 05:26:57 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Build RPM Package
|
|
|
|
run: make rpm
|
|
|
|
- name: List generated files
|
|
|
|
run: ls -l *.rpm
|
2024-02-22 05:25:01 +01:00
|
|
|
build-package-manually:
|
2024-02-22 06:15:48 +01:00
|
|
|
if: github.event_name != 'pull_request' && github.event_name != 'push'
|
2024-02-22 05:25:01 +01:00
|
|
|
name: Build Packages Manually
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Build RPM Package
|
|
|
|
run: make rpm
|
|
|
|
- name: Upload package
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: packages
|
|
|
|
path: "*.rpm"
|
|
|
|
if-no-files-found: error
|
|
|
|
retention-days: 3
|
2023-08-10 05:26:57 +02:00
|
|
|
publish-package:
|
2024-02-22 05:25:01 +01:00
|
|
|
if: github.event.push
|
2023-08-10 05:26:57 +02:00
|
|
|
name: Publish Packages
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 00:35:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-10 05:26:57 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Build RPM Package
|
|
|
|
run: make rpm
|
|
|
|
- name: List generated files
|
|
|
|
run: ls -l *.rpm
|
|
|
|
- name: Upload package to repository
|
|
|
|
env:
|
|
|
|
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
|
|
|
|
run: for f in *.rpm; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done
|