|
22 | 22 | id: create_release |
23 | 23 | if: '${{ github.event.inputs.do_release == ''yes'' }}' |
24 | 24 | with: |
| 25 | + allowUpdates: true |
25 | 26 | tag: '${{ github.event.inputs.release }}' |
26 | 27 | name: '${{ github.event.inputs.release }}' |
27 | 28 | draft: false |
|
31 | 32 | compile: |
32 | 33 | needs: prepare |
33 | 34 | runs-on: ubuntu-latest |
| 35 | + permissions: |
| 36 | + contents: write |
34 | 37 | continue-on-error: true |
35 | 38 | strategy: |
36 | 39 | matrix: |
@@ -85,142 +88,51 @@ jobs: |
85 | 88 | - x86_64-linux-muslx32 |
86 | 89 | repo: |
87 | 90 | - richfelker/musl-cross-make |
88 | | - - pmmp/musl-cross-make |
| 91 | + - nginxui/pmmp-musl-cross-make |
89 | 92 | env: |
90 | | - TARGET: '${{ matrix.target }}' |
91 | | - REPO: '${{ matrix.repo }}' |
| 93 | + TARGET: ${{ matrix.target }} |
| 94 | + REPO: ${{ matrix.repo == 'nginxui/pmmp-musl-cross-make' && 'pmmp/musl-cross-make' || matrix.repo }} |
92 | 95 | steps: |
93 | | - - uses: actions/checkout@v3 |
| 96 | + - name: Checkout |
| 97 | + uses: actions/checkout@v3 |
| 98 | + |
94 | 99 | - name: 'Clone ${{ matrix.repo }}' |
95 | 100 | run: 'git clone https://github.com/${{ matrix.repo }} mcm' |
| 101 | + |
96 | 102 | - name: 'Build ${{ matrix.target }}' |
97 | 103 | run: |- |
98 | 104 | make -j4 |
99 | 105 | make install |
100 | 106 | ls output |
101 | 107 | working-directory: mcm |
| 108 | + |
102 | 109 | - name: 'Package ${{ matrix.target }}' |
103 | 110 | id: package |
104 | 111 | run: |- |
105 | 112 | tar -czvf ../output-${{ matrix.target }}.tar.gz output/ |
106 | 113 | echo "source_escaped=${REPO%%/*}_${REPO##*/}" >> $GITHUB_OUTPUT |
107 | 114 | working-directory: mcm |
108 | | - - id: upload-artifacts-0 |
109 | | - name: Upload artifacts 0 |
| 115 | + |
| 116 | + - id: upload-artifacts |
| 117 | + name: Upload artifacts |
110 | 118 | if: '${{ success() }}' |
111 | | - continue-on-error: false |
112 | | - uses: actions/upload-artifact@v3 |
| 119 | + |
113 | 120 | with: |
114 | 121 | path: 'output-${{ matrix.target }}.tar.gz' |
115 | 122 | name: '${{ matrix.target }}-${{ steps.package.outputs.source_escaped }}' |
116 | | - - id: upload-releases-0 |
117 | | - name: Upload to releases 0 |
118 | | - uses: actions/upload-release-asset@v1 |
| 123 | + |
| 124 | + - name: Rename artifact |
| 125 | + run: mv output-${{ matrix.target }}.tar.gz output-${{ matrix.target }}-${{ steps.package.outputs.source_escaped }}.tar.gz |
| 126 | + |
| 127 | + - id: upload-releases |
| 128 | + name: Upload to releases |
| 129 | + uses: ncipollo/release-action@v1 |
119 | 130 | if: '${{ github.event.inputs.do_release == ''yes'' }}' |
120 | | - continue-on-error: false |
121 | | - with: |
122 | | - asset_path: 'output-${{ matrix.target }}.tar.gz' |
123 | | - asset_name: >- |
124 | | - output-${{ matrix.target }}-${{ steps.package.outputs.source_escaped |
125 | | - }}.tar.gz |
126 | | - upload_url: '${{ needs.prepare.outputs.upload_url }}' |
127 | | - asset_content_type: application/gzip |
128 | | - env: |
129 | | - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
130 | | - - id: upload-artifacts-1 |
131 | | - name: Upload artifacts 1 |
132 | | - if: '${{ steps.upload-artifacts-0.outcome == ''failure'' }}' |
133 | | - continue-on-error: false |
134 | | - uses: actions/upload-artifact@v3 |
135 | | - with: |
136 | | - path: 'output-${{ matrix.target }}.tar.gz' |
137 | | - name: '${{ matrix.target }}-${{ steps.package.outputs.source_escaped }}' |
138 | | - - id: upload-releases-1 |
139 | | - name: Upload to releases 1 |
140 | | - uses: actions/upload-release-asset@v1 |
141 | | - if: >- |
142 | | - ${{ github.event.inputs.do_release == 'yes' && |
143 | | - steps.upload-releases-0.outcome == 'failure' }} |
144 | | - continue-on-error: false |
145 | | - with: |
146 | | - asset_path: 'output-${{ matrix.target }}.tar.gz' |
147 | | - asset_name: >- |
148 | | - output-${{ matrix.target }}-${{ steps.package.outputs.source_escaped |
149 | | - }}.tar.gz |
150 | | - upload_url: '${{ needs.prepare.outputs.upload_url }}' |
151 | | - asset_content_type: application/gzip |
152 | | - env: |
153 | | - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
154 | | - - id: upload-artifacts-2 |
155 | | - name: Upload artifacts 2 |
156 | | - if: '${{ steps.upload-artifacts-1.outcome == ''failure'' }}' |
157 | | - continue-on-error: false |
158 | | - uses: actions/upload-artifact@v3 |
159 | 131 | with: |
160 | | - path: 'output-${{ matrix.target }}.tar.gz' |
161 | | - name: '${{ matrix.target }}-${{ steps.package.outputs.source_escaped }}' |
162 | | - - id: upload-releases-2 |
163 | | - name: Upload to releases 2 |
164 | | - uses: actions/upload-release-asset@v1 |
165 | | - if: >- |
166 | | - ${{ github.event.inputs.do_release == 'yes' && |
167 | | - steps.upload-releases-1.outcome == 'failure' }} |
168 | | - continue-on-error: false |
169 | | - with: |
170 | | - asset_path: 'output-${{ matrix.target }}.tar.gz' |
171 | | - asset_name: >- |
172 | | - output-${{ matrix.target }}-${{ steps.package.outputs.source_escaped |
173 | | - }}.tar.gz |
174 | | - upload_url: '${{ needs.prepare.outputs.upload_url }}' |
175 | | - asset_content_type: application/gzip |
176 | | - env: |
177 | | - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
178 | | - - id: upload-artifacts-3 |
179 | | - name: Upload artifacts 3 |
180 | | - if: '${{ steps.upload-artifacts-2.outcome == ''failure'' }}' |
181 | | - continue-on-error: false |
182 | | - uses: actions/upload-artifact@v3 |
183 | | - with: |
184 | | - path: 'output-${{ matrix.target }}.tar.gz' |
185 | | - name: '${{ matrix.target }}-${{ steps.package.outputs.source_escaped }}' |
186 | | - - id: upload-releases-3 |
187 | | - name: Upload to releases 3 |
188 | | - uses: actions/upload-release-asset@v1 |
189 | | - if: >- |
190 | | - ${{ github.event.inputs.do_release == 'yes' && |
191 | | - steps.upload-releases-2.outcome == 'failure' }} |
192 | | - continue-on-error: false |
193 | | - with: |
194 | | - asset_path: 'output-${{ matrix.target }}.tar.gz' |
195 | | - asset_name: >- |
196 | | - output-${{ matrix.target }}-${{ steps.package.outputs.source_escaped |
197 | | - }}.tar.gz |
198 | | - upload_url: '${{ needs.prepare.outputs.upload_url }}' |
199 | | - asset_content_type: application/gzip |
200 | | - env: |
201 | | - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
202 | | - - id: upload-artifacts-4 |
203 | | - name: Upload artifacts 4 |
204 | | - if: '${{ steps.upload-artifacts-3.outcome == ''failure'' }}' |
205 | | - continue-on-error: true |
206 | | - uses: actions/upload-artifact@v3 |
207 | | - with: |
208 | | - path: 'output-${{ matrix.target }}.tar.gz' |
209 | | - name: '${{ matrix.target }}-${{ steps.package.outputs.source_escaped }}' |
210 | | - - id: upload-releases-4 |
211 | | - name: Upload to releases 4 |
212 | | - uses: actions/upload-release-asset@v1 |
213 | | - if: >- |
214 | | - ${{ github.event.inputs.do_release == 'yes' && |
215 | | - steps.upload-releases-3.outcome == 'failure' }} |
216 | | - continue-on-error: true |
217 | | - with: |
218 | | - asset_path: 'output-${{ matrix.target }}.tar.gz' |
219 | | - asset_name: >- |
220 | | - output-${{ matrix.target }}-${{ steps.package.outputs.source_escaped |
221 | | - }}.tar.gz |
222 | | - upload_url: '${{ needs.prepare.outputs.upload_url }}' |
223 | | - asset_content_type: application/gzip |
| 132 | + allowUpdates: true |
| 133 | + tag: '${{ github.event.inputs.release }}' |
| 134 | + artifacts: 'output-${{ matrix.target }}*.tar.gz' |
| 135 | + artifactContentType: application/gzip |
224 | 136 | env: |
225 | 137 | GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
226 | 138 |
|
0 commit comments