| 1 |
--- |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
name: Create packages and release |
| 6 |
|
| 7 |
on: |
| 8 |
push: |
| 9 |
tags: |
| 10 |
- "v*" |
| 11 |
|
| 12 |
jobs: |
| 13 |
build-centos7: |
| 14 |
name: Build centOS 7 RPMs |
| 15 |
runs-on: ubuntu-latest |
| 16 |
container: quay.io/centos/centos:7 |
| 17 |
steps: |
| 18 |
|
| 19 |
- uses: actions/checkout@v3 |
| 20 |
with: |
| 21 |
fetch-depth: 0 |
| 22 |
- name: install build requisites |
| 23 |
run: | |
| 24 |
yum install -y rpm-build make rsync |
| 25 |
- name: build rpm |
| 26 |
run: | |
| 27 |
make clean rpm |
| 28 |
- name: Upload RPMs |
| 29 |
uses: actions/upload-artifact@v3 |
| 30 |
with: |
| 31 |
name: rpms7 |
| 32 |
path: | |
| 33 |
build/RPMS/noarch/bdii-*.el7.noarch.rpm |
| 34 |
build/SRPMS/bdii-*.el7.src.rpm |
| 35 |
|
| 36 |
build-almalinux8: |
| 37 |
name: Build AlmaLinux 8 RPMs |
| 38 |
runs-on: ubuntu-latest |
| 39 |
container: almalinux:8 |
| 40 |
steps: |
| 41 |
- uses: actions/checkout@v4 |
| 42 |
with: |
| 43 |
fetch-depth: 0 |
| 44 |
- name: Install build requisites |
| 45 |
run: | |
| 46 |
yum install -y rpm-build make rsync |
| 47 |
- name: build rpm |
| 48 |
run: | |
| 49 |
make clean rpm |
| 50 |
- name: Upload RPMs |
| 51 |
uses: actions/upload-artifact@v3 |
| 52 |
with: |
| 53 |
name: rpms8 |
| 54 |
path: | |
| 55 |
build/RPMS/noarch/bdii-*.el8.noarch.rpm |
| 56 |
build/SRPMS/bdii-*.el8.src.rpm |
| 57 |
|
| 58 |
build-almalinux9: |
| 59 |
name: Build AlmaLinux 9 RPMs |
| 60 |
runs-on: ubuntu-latest |
| 61 |
container: almalinux:9 |
| 62 |
steps: |
| 63 |
- uses: actions/checkout@v4 |
| 64 |
with: |
| 65 |
fetch-depth: 0 |
| 66 |
- name: Install build requisites |
| 67 |
run: | |
| 68 |
yum install -y rpm-build make rsync systemd-rpm-macros |
| 69 |
- name: build rpm |
| 70 |
run: | |
| 71 |
make clean rpm |
| 72 |
- name: Upload RPMs |
| 73 |
uses: actions/upload-artifact@v3 |
| 74 |
with: |
| 75 |
name: rpms9 |
| 76 |
path: | |
| 77 |
build/RPMS/noarch/bdii-*.el9.noarch.rpm |
| 78 |
build/SRPMS/bdii-*.el9.src.rpm |
| 79 |
|
| 80 |
release7: |
| 81 |
name: Upload CentOS 7 release artefacts |
| 82 |
permissions: |
| 83 |
contents: write |
| 84 |
needs: build-centos7 |
| 85 |
runs-on: ubuntu-latest |
| 86 |
steps: |
| 87 |
- uses: actions/download-artifact@v3 |
| 88 |
with: |
| 89 |
name: rpms7 |
| 90 |
- name: Find package name |
| 91 |
id: package_name_centos7 |
| 92 |
run: | |
| 93 |
rpm_path=$(find . -name 'bdii-*.el7.noarch.rpm') |
| 94 |
src_path=$(find . -name 'bdii-*.el7.src.rpm') |
| 95 |
echo "rpm_path=${rpm_path}" >> "$GITHUB_OUTPUT" |
| 96 |
echo "src_path=${src_path}" >> "$GITHUB_OUTPUT" |
| 97 |
- name: Attach CentOS 7 RPMs to the release |
| 98 |
uses: softprops/action-gh-release@v2 |
| 99 |
env: |
| 100 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 101 |
with: |
| 102 |
fail_on_unmatched_files: true |
| 103 |
files: | |
| 104 |
${{ steps.package_name_centos7.outputs.rpm_path }} |
| 105 |
${{ steps.package_name_centos7.outputs.src_path }} |
| 106 |
|
| 107 |
release8: |
| 108 |
name: Upload AlmaLinux 8 release artefacts |
| 109 |
permissions: |
| 110 |
contents: write |
| 111 |
needs: build-almalinux8 |
| 112 |
runs-on: ubuntu-latest |
| 113 |
steps: |
| 114 |
- uses: actions/download-artifact@v3 |
| 115 |
with: |
| 116 |
name: rpms8 |
| 117 |
- name: Find package name |
| 118 |
id: package_name_almalinux8 |
| 119 |
run: | |
| 120 |
rpm_path=$(find . -name 'bdii-*.el8.noarch.rpm') |
| 121 |
src_path=$(find . -name 'bdii-*.el8.src.rpm') |
| 122 |
echo "rpm_path=${rpm_path}" >> "$GITHUB_OUTPUT" |
| 123 |
echo "src_path=${src_path}" >> "$GITHUB_OUTPUT" |
| 124 |
- name: Attach AlmaLinux 8 RPMs to the release |
| 125 |
uses: softprops/action-gh-release@v2 |
| 126 |
env: |
| 127 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 128 |
with: |
| 129 |
fail_on_unmatched_files: true |
| 130 |
files: | |
| 131 |
${{ steps.package_name_almalinux8.outputs.rpm_path }} |
| 132 |
${{ steps.package_name_almalinux8.outputs.src_path }} |
| 133 |
|
| 134 |
release9: |
| 135 |
name: Upload AlmaLinux 9 release artefacts |
| 136 |
permissions: |
| 137 |
contents: write |
| 138 |
needs: build-almalinux9 |
| 139 |
runs-on: ubuntu-latest |
| 140 |
steps: |
| 141 |
- uses: actions/download-artifact@v3 |
| 142 |
with: |
| 143 |
name: rpms9 |
| 144 |
- name: Find package name |
| 145 |
id: package_name_almalinux9 |
| 146 |
run: | |
| 147 |
rpm_path=$(find . -name 'bdii-*.el9.noarch.rpm') |
| 148 |
src_path=$(find . -name 'bdii-*.el9.src.rpm') |
| 149 |
echo "rpm_path=${rpm_path}" >> "$GITHUB_OUTPUT" |
| 150 |
echo "src_path=${src_path}" >> "$GITHUB_OUTPUT" |
| 151 |
- name: Attach AlmaLinux 9 RPMs to the release |
| 152 |
uses: softprops/action-gh-release@v2 |
| 153 |
env: |
| 154 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 155 |
with: |
| 156 |
fail_on_unmatched_files: true |
| 157 |
files: | |
| 158 |
${{ steps.package_name_almalinux9.outputs.rpm_path }} |
| 159 |
${{ steps.package_name_almalinux9.outputs.src_path }} |