How to deploy to github with file pattern on travis?

前端 未结 3 1602
情话喂你
情话喂你 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条回答
  •  Happy的楠姐
    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.

提交回复
热议问题