Skip to content

Commit 8df95a0

Browse files
committed
Developing build rpm package with container Ubuntu 20.04 and Qt6
1 parent 97fd3a1 commit 8df95a0

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/build-rpm-qt6-amd64.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ jobs:
3030
- name: Checkout repository
3131
uses: actions/checkout@v4
3232
with:
33-
fetch-depth: 0
3433
ref: ${{ github.ref_name }}
3534

35+
- name: Import GPG keys
36+
env:
37+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
38+
run: echo "$GPG_PRIVATE_KEY" | gpg --batch --import
39+
3640
- name: Extract version from CMakeLists.txt
3741
id: extract_version
3842
run: |
@@ -188,10 +192,24 @@ jobs:
188192
working-directory: ${{ env.BUILD_RPM_DIR }}
189193
run: |
190194
rpmbuild --define "_topdir `pwd`" -v -ba SPECS/omodsim.spec
195+
rpmsign --addsign --define "_gpg_name 841A6E73CED20603737BDCBA457ECBB2757E57F1" \
196+
${{ env.BUILD_RPM_DIR }}/RPMS/${{ env.RPM_ARCH }}/${{ env.RPM_PACKAGE_NAME }}-${{ env.APP_VERSION }}-${{ env.RPM_REVISION }}.${{ env.RPM_ARCH }}.rpm
191197
192198
- name: Upload RPM package
193199
uses: actions/upload-artifact@v4
194200
if: success()
195201
with:
196202
name: ${{ env.RPM_PACKAGE_NAME }}-${{ env.APP_VERSION }}-${{ env.RPM_REVISION }}.${{ env.RPM_ARCH }}
197203
path: ${{ env.BUILD_RPM_DIR }}/RPMS/${{ env.RPM_ARCH }}/${{ env.RPM_PACKAGE_NAME }}-${{ env.APP_VERSION }}-${{ env.RPM_REVISION }}.${{ env.RPM_ARCH }}.rpm
204+
205+
- name: Save public GPG key to file
206+
env:
207+
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
208+
run: |
209+
echo "$GPG_PUBLIC_KEY" > ${{ env.RPM_PACKAGE_NAME }}.rpm.pubkey
210+
211+
- name: Upload public GPG key
212+
uses: actions/upload-artifact@v4
213+
with:
214+
name: ${{ env.RPM_PACKAGE_NAME }}.rpm.pubkey
215+
path: ${{ env.RPM_PACKAGE_NAME }}.rpm.pubkey

0 commit comments

Comments
 (0)