|
| 1 | +# This file was autogenerated by cargo-dist: https://opensource.axo.dev/cargo-dist/ |
| 2 | +# |
1 | 3 | # Copyright 2022-2024, axodotdev |
2 | 4 | # SPDX-License-Identifier: MIT or Apache-2.0 |
3 | 5 | # |
|
61 | 63 | # we specify bash to get pipefail; it guards against the `curl` command |
62 | 64 | # failing. otherwise `sh` won't catch that `curl` returned non-0 |
63 | 65 | shell: bash |
64 | | - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.21.0/cargo-dist-installer.sh | sh" |
| 66 | + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.22.1/cargo-dist-installer.sh | sh" |
65 | 67 | - name: Cache cargo-dist |
66 | 68 | uses: actions/upload-artifact@v4 |
67 | 69 | with: |
@@ -299,20 +301,55 @@ jobs: |
299 | 301 | name=$(echo "$filename" | sed "s/\.rb$//") |
300 | 302 | version=$(echo "$release" | jq .app_version --raw-output) |
301 | 303 |
|
| 304 | + export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" |
| 305 | + brew update |
| 306 | + # We avoid reformatting user-provided data such as the app description and homepage. |
| 307 | + brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true |
| 308 | +
|
302 | 309 | git add "Formula/${filename}" |
303 | 310 | git commit -m "${name} ${version}" |
304 | 311 | done |
305 | 312 | git push |
306 | 313 |
|
| 314 | + custom-cliff: |
| 315 | + needs: |
| 316 | + - plan |
| 317 | + - host |
| 318 | + if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} |
| 319 | + uses: ./.github/workflows/cliff.yml |
| 320 | + with: |
| 321 | + plan: ${{ needs.plan.outputs.val }} |
| 322 | + secrets: inherit |
| 323 | + # publish jobs get escalated permissions |
| 324 | + permissions: |
| 325 | + "id-token": "write" |
| 326 | + "packages": "write" |
| 327 | + |
| 328 | + custom-publish-plugin: |
| 329 | + needs: |
| 330 | + - plan |
| 331 | + - host |
| 332 | + if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }} |
| 333 | + uses: ./.github/workflows/publish-plugin.yml |
| 334 | + with: |
| 335 | + plan: ${{ needs.plan.outputs.val }} |
| 336 | + secrets: inherit |
| 337 | + # publish jobs get escalated permissions |
| 338 | + permissions: |
| 339 | + "id-token": "write" |
| 340 | + "packages": "write" |
| 341 | + |
307 | 342 | announce: |
308 | 343 | needs: |
309 | 344 | - plan |
310 | 345 | - host |
311 | 346 | - publish-homebrew-formula |
| 347 | + - custom-cliff |
| 348 | + - custom-publish-plugin |
312 | 349 | # use "always() && ..." to allow us to wait for all publish jobs while |
313 | 350 | # still allowing individual publish jobs to skip themselves (for prereleases). |
314 | 351 | # "host" however must run to completion, no skipping allowed! |
315 | | - if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') }} |
| 352 | + if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') && (needs.custom-cliff.result == 'skipped' || needs.custom-cliff.result == 'success') && (needs.custom-publish-plugin.result == 'skipped' || needs.custom-publish-plugin.result == 'success') }} |
316 | 353 | runs-on: "ubuntu-20.04" |
317 | 354 | env: |
318 | 355 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
0 commit comments