title: Ansible - Download latest release binary from Github repo
body: <p>With Ansible please advise how i could download the latest release binary from Github repository. As per my current understanding the steps would be:
  a. get URL of latest release
  b. download the release</p>
  
  <p>For a. I have something like which does not provide the actual release (ex. v0.11.53):</p>
  
  <pre><code> - name: get latest Gogs release
    local_action:
      module: uri
      url: https://github.com/gogits/gogs/releases/latest
      method: GET
      follow_redirects: no
      status_code: 301
      register: release_url
  </code></pre>
  
  <p>For b. I have the below which works but needs constant updating. Instead of version i would need a variable set in a.:</p>
  
  <pre><code>- name: download latest
      become: yes
      become-user: "{{gogs_user}}"
      get_url:
       url: https://github.com/gogs/gogs/releases/download/v0.11.53/linux_amd64.tar.gz
      dest: "/home/{{gogs_user}}/linux_amd64.tar.gz"
  </code></pre>
  
  <p>Thank you!</p>