|
11 | 11 | #
|
12 | 12 | # This pipeline uses the following GitHub Action Secrets:
|
13 | 13 | #
|
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 |
17 | 22 | #
|
18 | 23 | # ------------------------------------------------------------------------------
|
19 | 24 | #
|
|
55 | 60 | - name: "Test that Puppet module can build"
|
56 | 61 | run: "bundle exec pdk build --force"
|
57 | 62 |
|
| 63 | + |
58 | 64 | create-github-release:
|
59 | 65 | name: Deploy GitHub Release
|
60 | 66 | needs: [ releng-checks ]
|
|
67 | 73 | ref: ${{ github.ref }}
|
68 | 74 | clean: true
|
69 | 75 | 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 | + |
70 | 86 | - name: Get tag & annotation info (${{github.ref}})
|
71 | 87 | id: tag-check
|
72 | 88 | run: |
|
@@ -99,9 +115,19 @@ jobs:
|
99 | 115 | draft: false
|
100 | 116 | prerelease: false
|
101 | 117 |
|
| 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 | + |
102 | 128 | deploy-to-puppet-forge:
|
103 | 129 | name: Deploy PuppetForge Release
|
104 |
| - needs: [ releng-checks ] |
| 130 | + needs: [ create-github-release ] |
105 | 131 | if: github.repository_owner == 'simp'
|
106 | 132 | runs-on: ubuntu-18.04
|
107 | 133 | env:
|
|
0 commit comments