How do you specify artifacts for a GitHub release?

Malvineous's Avatar

Malvineous

29 May, 2016 12:04 AM

I'm a little confused about how to upload a built .dll as a GitHub release. Appveyor is creating the GH release, but complains:

No artifacts were published. Make sure you have specified correct artifacts filter.

The example says you can do this:

artifact: /.*\.nupkg/            # upload all NuGet packages to release assets

So it looks like you can specify filenames using regular expressions. However I have tried all these variations and nothing is working:

artifact: bin\Release\output.dll
artifact: myproject\bin\Release\output.dll
artifact: /.*bin\\Release\\output\.dll/
artifact: /.*bin\/Release\/output\.dll/
artifact: |.*bin/Release/output\.dll|

I am not sure what path to supply. In the build_script the current directory is in the git repository root, but this does not seem to be the case in the deploy section.

When looking further, there is a note that says "don't forget to package your artifact first" which links to this page, however that page doesn't explain what part of the packaging you are supposed to supply in the deploy section.

Are you supposed to list the .dll filenames in the artifacts section, then use the same filenames in the deploy section? Or are you supposed to give each artifacts entry a name like in the example, then specify the name in the deploy section? It also says at the top of that page that the paths are relative to the root of the repository, but then the examples given start with myproject/ which seems to suggest you have to put your project name at the start of each path, so it is not actually in the root directory after all?

I'm a little confused!

If I have a project like this, how exactly should it be deployed?

.git/
README
src/example.cpp
Debug/example.dll

appveyor.yml:

artifacts:
- path: ?
  name: myartifact
deploy:
- provider: GitHub
  artifact: myartifact  # Is this the "name" from the artifacts section, or something else?
  1. Support Staff 1 Posted by Feodor Fitsner on 29 May, 2016 02:30 AM

    Feodor Fitsner's Avatar

    For this example:

    .git/
    README
    src/example.cpp
    Debug/example.dll
    

    appveyor.yml:

    artifacts:
    - path: Debug\example.dll
      name: myartifact
    deploy:
    - provider: GitHub
      artifact: myartifact
    
  2. 2 Posted by Malvineous on 29 May, 2016 02:44 AM

    Malvineous's Avatar

    Many thanks for the answer! So does deploy.artifact always have to match artifacts.name? How does the *.nupkg example work then - can it also match artifacts.path or is there some other trick for when deploy.artifact specifies a filename?

  3. Support Staff 3 Posted by Feodor Fitsner on 30 May, 2016 05:30 PM

    Feodor Fitsner's Avatar

    deploy.artifact can be either exact value or regexp for either "Deployment name" or file name.

  4. 4 Posted by Malvineous on 05 Jun, 2016 10:35 AM

    Malvineous's Avatar

    Many thanks for this. I have submitted a pull request to add a couple of points to the docs to clarify what you have told me:

    https://github.com/appveyor/website/pull/138

    I hope you think it is worth including!

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:24 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Aug, 2019 11:06 PM
21 Aug, 2019 02:08 PM
21 Aug, 2019 01:37 PM
21 Aug, 2019 10:21 AM
21 Aug, 2019 09:10 AM

 

21 Aug, 2019 05:56 AM
21 Aug, 2019 03:08 AM
20 Aug, 2019 11:33 PM
20 Aug, 2019 08:07 PM
20 Aug, 2019 05:50 PM
20 Aug, 2019 12:35 PM