softprops / action-gh-release

📦 :octocat: GitHub Action for creating GitHub Releases
MIT License
4.19k stars 460 forks source link

feature request: pass array to `files` #247

Open RodrigoDornelles opened 2 years ago

RodrigoDornelles commented 2 years ago

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"
puzzle9 commented 2 years ago

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

RodrigoDornelles commented 2 years ago

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

danielchalmers commented 2 years ago

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

softprops commented 1 year ago

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
RodrigoDornelles commented 1 year ago

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.

gaetschwartz commented 1 year ago

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

wbadart commented 1 year ago

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