ncipollo / release-action

An action which manages a github release

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to fix "tag_name is not a valid tag"?

TheMelody opened this issue · comments

Error 422: Validation Failed: {"resource":"Release","code":"custom","field":"tag_name","message":"tag_name is not a valid tag"}, {"resource":"Release","code":"custom","message":"Published releases must have a valid tag"}, {"resource":"Release","code":"invalid","field":"target_commitish"}

yml:

      - name: Create a Release APK
        uses: ncipollo/release-action@v1
        with:
          allowUpdates: true
          artifacts: "app/build/outputs/apk/release/*.apk"
          artifactErrorsFailBuild: true
          body:  |
            **demo**
          token: ${{ secrets.github_token }}
          commit: master
          tag: ${{ github.ref_name }}

Please post questions within the discussions tab so that others can benefit from the answer.

I think your issue is refname is not always just the commit, it will have a prefix sometimes (if it's a tag, etc). Also if you are running your workflow on a tag push trigger you don't need to set that field.