Cannot deploy artifacts to GitHub

chris+appveyor's Avatar

chris+appveyor

Apr 28, 2017 @ 09:08 PM

Hi all,

I'm trying to deploy my artifacts to GitHub as releases, but nothing gets uploaded.

Because I'm building out of tree, I failed to get the artifacts section of appveyor.yml to do anything useful (forbidden to upload from outside of source directory for security reasons?) so I'm trying to PushArtifact instead, but it also doesn't work. You can see at the end of the build log:

appveyor PushArtifact BoxBackup-%compiled_version%.zip
Uploading artifact BoxBackup-0.12.s3_support.170426.87e2319_Win_x64_Debug.zip (22 bytes)...100%
appveyor PushArtifact BoxBackup-%compiled_version%.exe
Uploading artifact BoxBackup-0.12.s3_support.170426.87e2319_Win_x64_Debug.exe (194,662 bytes)...100%
Deploying using GitHub provider
Creating "BoxBackup-0.12.s3_support.170426.87e2319_Win_x64_Debug" release for repository "boxbackup/boxbackup" tag "BoxBackup-0.12.s3_support.170426.87e2319_Win_x64_Debug" commit "87e23191a5173a9453545177cd3b56b54f1999e7"...OK
No artifacts were published. Make sure you have specified correct artifacts filter.
Updating "BoxBackup-0.12.s3_support.170426.87e2319_Win_x64_Debug" release for repository "boxbackup/boxbackup" tag "BoxBackup-0.12.s3_support.170426.87e2319_Win_x64_Debug" commit "87e23191a5173a9453545177cd3b56b54f1999e7"...OK
Build success

The Deploy specification is:

deploy:
  - provider: GitHub
    release: BoxBackup-$(compiled_version)
    artifact: BoxBackup-$(compiled_version).*
    description: "Windows client binaries auto-built by AppVeyor"
    draft: false
    prerelease: true
    auth_token:
      secure: <hidden>
    on:
      branch:
        - master
        - s3_support

So why does this not match the artifacts that I've just pushed? Are environment variables such as $(compiled_version) not supported in the artifact name? Or do I need to provide a full path? It would be really helpful to have a list of all the artifacts known by the system, in exactly the format that needs to be specified in the artifact: key, when the deploy step fails.

Thanks in advance for your help,
Chris.

  1. 1 Posted by Ilya Finkelshte... on Apr 28, 2017 @ 10:22 PM

    Ilya Finkelshteyn's Avatar

    Hi Chris,

    You can run the following command

    - appveyor -path PushArtifact BoxBackup-%compiled_version%.zip -DeploymentName PushArtifact BoxBackup-%compiled_version%
    

    And set this in Deployment settings

    artifact: BoxBackup-$(compiled_version)
    

    Deployment name abstracts you from specific file name and path, and it is the best option to glue artifact to deployment.

    If you need more information about build artifacts, you can use artifacts hash table, but you don't have to as Deployment name is much clearer option.

    Also I am not sure I understood initial statement: Because I'm building out of tree, I failed to get the artifacts section of appveyor.yml to do anything useful. If you provide more information and simple repro, we can try to help with this too, though provided option with command and deployment name should fix your issues.

    Ilya.

  2. 2 Posted by chris+appveyor on May 09, 2017 @ 08:20 PM

    chris+appveyor's Avatar

    That worked, thank you! I should probably update the documentation to make this clearer.

  3. chris+appveyor closed this discussion on Jan 01, 2018 @ 08:02 PM.

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