From 8281f24c31ac4a0d2f465a6ec4a0cb978b25d130 Mon Sep 17 00:00:00 2001 From: Nick Gallegos Date: Wed, 23 Sep 2026 16:30:39 -0600 Subject: [PATCH] Add create-draft-release-with-assets composite action --- .../action.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/actions/create-draft-release-with-assets/action.yml diff --git a/.github/actions/create-draft-release-with-assets/action.yml b/.github/actions/create-draft-release-with-assets/action.yml new file mode 100644 index 0000000..87a67dc --- /dev/null +++ b/.github/actions/create-draft-release-with-assets/action.yml @@ -0,0 +1,19 @@ +name: Create draft release with assets +description: Creates a draft GitHub release and attaches asset files found under the given paths +inputs: + asset-paths: + required: true + description: Comma-separated paths/globs passed to Get-ChildItem, e.g. "nugets/, powershellModules/, assets/" +runs: + using: composite + steps: + - name: Create draft release and attach assets + shell: pwsh + run: | + $paths = '${{ inputs.asset-paths }}' -split ',' | ForEach-Object { $_.Trim() } + $assets = (Get-ChildItem -Path $paths -File -Recurse).FullName + Write-Output "Assets to attach: $assets" + Write-Output "Creating draft release for ${{ github.event.repository.name }} ${{ github.ref_name }} at commit ${{ github.sha }}" + gh release create ${{ github.ref_name }} $assets -d -n "" -t "${{ github.ref_name }}" + env: + GH_TOKEN: ${{ github.token }}