diff --git a/README.md b/README.md index de26a23..27590f3 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,15 @@ Use it instead of `prepare-release`'s `release-assets` input when the build is slow or needs tools the wheel build does not, since that input ties asset generation to `invoke pre-build` on every matrix job. +When a release collects assets from more than one job, have each job upload under +its own name and let `github-release` gather them: + +```yaml +- uses: compas-dev/compas-actions/github-release@v1 + with: + release-assets-artifact-pattern: github-release-assets-* +``` + The trusted publisher remains explicit in the caller: ```yaml diff --git a/github-release/action.yml b/github-release/action.yml index e33daff..3f22ee6 100644 --- a/github-release/action.yml +++ b/github-release/action.yml @@ -26,6 +26,11 @@ inputs: release-assets-artifact-name: description: Workflow artifact containing additional release assets; leave empty for none default: "" + release-assets-artifact-pattern: + description: >- + Glob matching several artifacts of release assets, for a release whose assets are + produced by more than one job. Takes precedence over release-assets-artifact-name. + default: "" generate-release-notes: description: Ask GitHub to generate release notes instead of reading the changelog default: "false" @@ -67,12 +72,20 @@ runs: path: release-assets - name: Download additional release assets - if: inputs.release-assets-artifact-name != '' + if: inputs.release-assets-artifact-name != '' && inputs.release-assets-artifact-pattern == '' uses: actions/download-artifact@v8.0.1 with: name: ${{ inputs.release-assets-artifact-name }} path: release-assets + - name: Download additional release assets from several artifacts + if: inputs.release-assets-artifact-pattern != '' + uses: actions/download-artifact@v8.0.1 + with: + pattern: ${{ inputs.release-assets-artifact-pattern }} + merge-multiple: true + path: release-assets + - name: Read changelog entry if: inputs.generate-release-notes != 'true' id: changelog