|
25 | 25 |
|
26 | 26 | perform-draft-release: |
27 | 27 | name: Perform Draft Release |
| 28 | + id: draft_release |
28 | 29 | runs-on: ubuntu-20.04 |
29 | 30 | needs: [get-version-information] |
30 | 31 | steps: |
|
42 | 43 | ubuntu-22_04-package: |
43 | 44 | name: Package for Ubuntu 22.04 |
44 | 45 | runs-on: ubuntu-22.04 |
| 46 | + needs: [perform-draft-release] |
45 | 47 | steps: |
46 | 48 | - uses: actions/checkout@v4 |
47 | 49 | with: |
@@ -95,24 +97,20 @@ jobs: |
95 | 97 | deb_package_name="$(ls *.deb)" |
96 | 98 | echo "deb_package=./build/$deb_package_name" >> $GITHUB_OUTPUT |
97 | 99 | echo "deb_package_name=ubuntu-22.04-$deb_package_name" >> $GITHUB_OUTPUT |
98 | | - - name: Get release info |
99 | | - id: get_release_info |
100 | | - uses: bruceadams/get-release@v1.3.2 |
101 | | - env: |
102 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
103 | 100 | - name: Upload binary packages |
104 | 101 | uses: actions/upload-release-asset@v1 |
105 | 102 | env: |
106 | 103 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
107 | 104 | with: |
108 | | - upload_url: ${{ steps.get_release_info.outputs.upload_url }} |
| 105 | + upload_url: ${{ steps.draft_release.outputs.upload_url }} |
109 | 106 | asset_path: ${{ steps.create_packages.outputs.deb_package }} |
110 | 107 | asset_name: ${{ steps.create_packages.outputs.deb_package_name }} |
111 | 108 | asset_content_type: application/x-deb |
112 | 109 |
|
113 | 110 | centos8-package: |
114 | 111 | name: Package for CentOS 8 |
115 | 112 | runs-on: ubuntu-22.04 |
| 113 | + needs: [perform-draft-release] |
116 | 114 | container: |
117 | 115 | image: centos:8 |
118 | 116 | steps: |
@@ -152,6 +150,7 @@ jobs: |
152 | 150 | - name: Create .rpm |
153 | 151 | run: | |
154 | 152 | VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2) |
| 153 | + SRC=`pwd` |
155 | 154 | rpmdev-setuptree |
156 | 155 |
|
157 | 156 | cat > ~/rpmbuild/SPECS/ebmc.spec << EOM |
@@ -185,20 +184,18 @@ jobs: |
185 | 184 |
|
186 | 185 | echo Building ebmc-${VERSION}-1.x86_64.rpm |
187 | 186 | (cd ~/rpmbuild/SPECS ; rpmbuild -v -bb ebmc.spec ) |
188 | | - - name: Get release info |
189 | | - id: get_release_info |
190 | | - uses: bruceadams/get-release@v1.3.2 |
191 | | - env: |
192 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 187 | + rpm_package_name=ebmc-${VERSION}-1.x86_64.rpm |
| 188 | + echo "rpm_package=~/rpmbuild/SPECS/$rpm_package_name" >> $GITHUB_OUTPUT |
| 189 | + echo "rpm_package_name=centos8-$rpm_package_name" >> $GITHUB_OUTPUT |
193 | 190 | - name: Upload binary packages |
194 | 191 | uses: actions/upload-release-asset@v1 |
195 | 192 | env: |
196 | 193 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
197 | 194 | with: |
198 | | - upload_url: ${{ steps.get_release_info.outputs.upload_url }} |
199 | | - asset_path: ${{ steps.create_packages.outputs.deb_package }} |
200 | | - asset_name: ${{ steps.create_packages.outputs.deb_package_name }} |
201 | | - asset_content_type: application/x-deb |
| 195 | + upload_url: ${{ steps.draft_release.outputs.upload_url }} |
| 196 | + asset_path: ${{ steps.create_packages.outputs.rpm_package }} |
| 197 | + asset_name: ${{ steps.create_packages.outputs.rpm_package_name }} |
| 198 | + asset_content_type: application/x-rpm |
202 | 199 |
|
203 | 200 | perform-release: |
204 | 201 | name: Perform Release |
|
0 commit comments