How to deploy to github with file pattern on travis?

前端 未结 3 1597
情话喂你
情话喂你 2020-12-14 16:22

I have created a simple travis configuration which packages an app and tries to deploy the archive file to github. The problem is, I would like to have the version number pa

相关标签:
3条回答
  • 2020-12-14 16:55

    Wildcards are supported by now if you enable the file_glob option. This is how I deploy a build .deb file to GitHub releases:

    before_deploy:
      - export RELEASE_PKG_FILE=$(ls *.deb)
      - echo "deploying $RELEASE_PKG_FILE to GitHub releases"
    deploy:
      provider: releases
      api_key:
        secure: YOUR_ENCRYPTED_API_KEY
      file_glob: true
      file: "${RELEASE_PKG_FILE}"
      on:
        tags: true
    

    Setting up is easy by executing travis setup releases with a dummy filename and modifying .travis.yml afterwards.

    0 讨论(0)
  • 2020-12-14 17:02

    Sorry, wildcard patterns don't work at the moment, but we'll have a look into making that possible on Travis CI.

    0 讨论(0)
  • 2020-12-14 17:03
    deploy:
      file_glob: true
      file: "build/distributions/worktrail-app-hub-sync*.zip"
    

    example

    0 讨论(0)
提交回复
热议问题