Skip to content

Commit bdfc30a

Browse files
authored
(SIMP-10073) GHA: Add signed RPM to Github release (#80)
1 parent dd8ad68 commit bdfc30a

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/tag_deploy.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@
1111
#
1212
# This pipeline uses the following GitHub Action Secrets:
1313
#
14-
# GitHub Secret variable Type Notes
15-
# ------------------------ -------- ----------------------------------------
16-
# PUPPETFORGE_API_TOKEN Required
14+
# GitHub Secret variable Notes
15+
# ------------------------------- ---------------------------------------
16+
# PUPPETFORGE_API_TOKEN
17+
# SIMP_CORE_REF_FOR_BUILDING_RPMS simp-core ref (tag) to use to build
18+
# RPMs with `rake pkg:single`
19+
# SIMP_DEV_GPG_SIGNING_KEY GPG signing key's secret key
20+
# SIMP_DEV_GPG_SIGNING_KEY_ID User ID (name) of signing key
21+
# SIMP_DEV_GPG_SIGNING_KEY_PASSPHRASE Passphrase to use GPG signing key
1722
#
1823
# ------------------------------------------------------------------------------
1924
#
@@ -55,6 +60,7 @@ jobs:
5560
- name: "Test that Puppet module can build"
5661
run: "bundle exec pdk build --force"
5762

63+
5864
create-github-release:
5965
name: Deploy GitHub Release
6066
needs: [ releng-checks ]
@@ -67,6 +73,16 @@ jobs:
6773
ref: ${{ github.ref }}
6874
clean: true
6975
fetch-depth: 0
76+
77+
- name: Build Release RPM
78+
uses: simp/github-action-build-and-sign-pkg-single-rpm@v1
79+
id: build-and-sign-rpm
80+
with:
81+
gpg_signing_key: ${{ secrets.SIMP_DEV_GPG_SIGNING_KEY }}
82+
gpg_signing_key_id: ${{ secrets.SIMP_DEV_GPG_SIGNING_KEY_ID }}
83+
gpg_signing_key_passphrase: ${{ secrets.SIMP_DEV_GPG_SIGNING_KEY_PASSPHRASE }}
84+
simp_core_ref_for_building_rpms: ${{ secrets.SIMP_CORE_REF_FOR_BUILDING_RPMS }}
85+
7086
- name: Get tag & annotation info (${{github.ref}})
7187
id: tag-check
7288
run: |
@@ -99,9 +115,19 @@ jobs:
99115
draft: false
100116
prerelease: false
101117

118+
- name: Upload RPM file to Release
119+
uses: actions/upload-release-asset@v1
120+
env:
121+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122+
with:
123+
upload_url: ${{ steps.create_release.outputs.upload_url }}
124+
asset_path: ${{ steps.build-and-sign-rpm.outputs.rpm_file_path }}
125+
asset_name: ${{ steps.build-and-sign-rpm.outputs.rpm_file_basename }}
126+
asset_content_type: application/octet-stream
127+
102128
deploy-to-puppet-forge:
103129
name: Deploy PuppetForge Release
104-
needs: [ releng-checks ]
130+
needs: [ create-github-release ]
105131
if: github.repository_owner == 'simp'
106132
runs-on: ubuntu-18.04
107133
env:

0 commit comments

Comments
 (0)