Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion github-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down