action-gh-release icon indicating copy to clipboard operation
action-gh-release copied to clipboard

feature request: pass array to `files`

Open RodrigoDornelles opened this issue 3 years ago • 7 comments

it would be interesting to send more than one patern in the same step, I end up having to duplicate it because I need to send .zip and .tar.gz

currently

      - name: Upload binaries and libaries to github (tarballs)
        uses: softprops/action-gh-release@v1
        with:
          files: "*.tar.gz"

      - name: Upload binaries and libaries to github (zippies)
        uses: softprops/action-gh-release@v1
        with:
          files: "*.zip"

suggestion

      - name: Upload binaries and libaries to github
        uses: softprops/action-gh-release@v1
        with:
          files:
            - "*.tar.gz"
            - "*.zip"

RodrigoDornelles avatar Jul 27 '22 23:07 RodrigoDornelles

try

- name: Upload binaries and libaries to github
uses: softprops/action-gh-release@v1
with:
  files: |
    "*.tar.gz"
    "*.zip"

https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets

puzzle9 avatar Jul 31 '22 06:07 puzzle9

try

- name: Upload binaries and libaries to github
uses: softprops/action-gh-release@v1
with:
  files: |
    "*.tar.gz"
    "*.zip"

https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets

dont work for me

Screen Shot 2022-08-01 at 16 10 31

RodrigoDornelles avatar Aug 01 '22 19:08 RodrigoDornelles

try

- name: Upload binaries and libaries to github
uses: softprops/action-gh-release@v1
with:
  files: |
    "*.tar.gz"
    "*.zip"

https://github.com/softprops/action-gh-release#%EF%B8%8F-uploading-release-assets

dont work for me

Screen Shot 2022-08-01 at 16 10 31

+1. I get the same error

danielchalmers avatar Aug 02 '22 01:08 danielchalmers

Github actions only supports strings at this time so I need to work within those design constraints. The multi line syntax in the readme is yaml syntax for a multi line at string

I’m the suggestion above you are double quoting that string but placing quotes inside that string. Try removing those

- name: Upload binaries and libaries to github
  uses: softprops/action-gh-release@v1
  with:
    files: |
      *.tar.gz
      *.zip

softprops avatar Nov 21 '22 15:11 softprops

Github actions only supports strings at this time so I need to work within those design constraints. The multi line syntax in the readme is yaml syntax for a multi line at string

I’m the suggestion above you are double quoting that string but placing quotes inside that string. Try removing those

- name: Upload binaries and libaries to github
  uses: softprops/action-gh-release@v1
  with:
    files: |
      *.tar.gz
      *.zip

doing this is not a valid yaml, and I had tested it before also in this case.

RodrigoDornelles avatar Nov 21 '22 16:11 RodrigoDornelles

Has there been progress on this one ? I'm also looking for a way to specify multiple patterns

gaetschwartz avatar Feb 11 '23 09:02 gaetschwartz

I'm wondering if an error I've been getting is related. I see Pattern '...' does not match any files even when the pattern doesn't have a wildcard and is an exact match with the one file in the working directory:

Screenshot 2023-03-03 at 19 56 37

workflow:

name: build
on:
  push:
    tags:
      - "v*.*.*"
permissions:
  contents: write
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    # this step actually compiles a Nim program but I believe that's
    # beside the point for our purposes:
    - run: touch prices-ubuntu-latest
    - uses: actions/upload-artifact@v3
      with:
        name: prices-ubuntu-latest
        path: prices-ubuntu-latest

  release:
    runs-on: ubuntu-latest
    needs: build
    steps:
    - uses: actions/download-artifact@v3
    - run: ls -al
    - uses: softprops/action-gh-release@v1
      with:
        files: |
          prices-ubuntu-latest

wbadart avatar Mar 04 '23 04:03 wbadart