pozetroninc / github-action-get-latest-release

A Github action to get the latest release from another repository.
MIT License
69 stars 36 forks source link

Don't return draft release. Is it normal? #15

Closed FBoucher closed 3 years ago

FBoucher commented 3 years ago

The latest release is a draft but is never returned. I also tried with only a draft and it doesn't return anything. I get the message "No valid releases"

name: Build Docker Images
on: [push]
jobs:
  build:
    name: cloudbot-beta
    runs-on: ubuntu-latest
    steps:
    - id: vars
      uses: pozetroninc/github-action-get-latest-release@master
      with:
          owner: FBoucher
          repo: CloudBot
    - uses: actions/checkout@v2
    - name: Publish to Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        name: ${{secrets.DOCKER_USER}}/cloudbot
        username: ${{ secrets.DOCKER_USER }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        tags: "latest,${{ steps.vars.outputs.release }}-beta"
neil-pozetroninc commented 3 years ago

Hi @FBoucher, yeah, I'm afraid that it's normal that this action doesn't return drafts. If I understand correctly the drafts are only visible to an authenticated user. Since this action doesn't currently take authentication credentials it's not possible to see the drafts.

When implementing the code to exclude the drafts I thought it might be a case that I needed to handle but I don't think drafts are ever returned.

neil-pozetroninc commented 3 years ago

I wanted to mention: https://github.com/rez0n/actions-github-release by @rez0n might work for you. It accepts a Github auth token so it may be able to give you draft releases.

FBoucher commented 3 years ago

Thanks @neil-pozetroninc I found it and I'm using it. It works perfectly.