question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No tag found in ref or input!

See original GitHub issue

Error-> Error undefined: No tag found in ref or input! Screenshot 2020-04-21 at 3 06 09 AM

I’m using the source tree for tagging the commits & also tried this command ->

git tag v1.0.5
git push origin v1.0.5
git push -u origin master

maybe I’m doing something wrong.I’m new to GitHub actions.

workflow file:-

name: Build
on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [12.x]

    steps:
      - uses: actions/checkout@v2.1.0

      - name: Cache node modules
        uses: actions/cache@v1.1.2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - name: Node ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: npm install and npm run build
        run: |
          npm i
          npm run build
      - name: Push Build to Releases
        uses: ncipollo/release-action@v1
        with:
          artifacts: "dist/paper-dj-ui/*"
          token: ${{ secrets.TOKEN }}

Thanks & regards, saurabh

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
UVLabscommented, May 17, 2021

Hi @saurabh47,

That error is indicating that the action doesn’t know which tag to use to create the release. There are a couple of ways to specify the tag:

Run your job on tag push

If you check out the example in the readme, you can see how to set this up: https://github.com/ncipollo/release-action#example .

The important bit is:

on: 
  push:
    tags:
    - '*'

Explicitly specify the tag as an input argument

You can manually pass in the tag via an input action - see https://github.com/ncipollo/release-action#action-inputs

In your example you would update your workflow to something like this:

- name: Push Build to Releases
        uses: ncipollo/release-action@v1
        with:
          artifacts: "dist/paper-dj-ui/*"
          tag: v1.0.5
          token: ${{ secrets.TOKEN }}

Given your example above I think you would probably want to go with the first option, since this will automatically work with what seems to be your use case.

This should be in the docs

1reaction
heyprancommented, Apr 24, 2020

Hi @saurabh47, That error is indicating that the action doesn’t know which tag to use to create the release. There are a couple of ways to specify the tag:

Run your job on tag push

If you check out the example in the readme, you can see how to set this up: https://github.com/ncipollo/release-action#example . The important bit is:

on: 
  push:
    tags:
    - '*'

Explicitly specify the tag as an input argument

You can manually pass in the tag via an input action - see https://github.com/ncipollo/release-action#action-inputs In your example you would update your workflow to something like this:

- name: Push Build to Releases
        uses: ncipollo/release-action@v1
        with:
          artifacts: "dist/paper-dj-ui/*"
          tag: v1.0.5
          token: ${{ secrets.TOKEN }}

Given your example above I think you would probably want to go with the first option, since this will automatically work with what seems to be your use case.

Hi, I am facing the same error but I am explicitly providing the tag name. I cannot use the auto-trigger as I am generating the tag via another action and that is rerunning the workflow. here is my action input–

      - name: Create a Release 
        uses: ncipollo/release-action@v1
        with:
          tag: "${{ steps.release_tag.outputs.new_tag }}"
          commit: $GITHUB_SHA
          artifacts: "/*.txt"
          token: ${{ secrets.GIT_TOKEN }}

I have been trying to solve this since a long time. What am I doing wrong here?

Okay I got it! This is why it was not working - https://github.community/t5/GitHub-Actions/Output-from-one-step-with-ID-to-another-is-empty/td-p/44432 I found a work around. Thank you anyways.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error undefined: No tag found in ref or input! #26381 - GitHub
Hi,. I am trying to create an action that will detect when a change has happened on a certain branch and then build...
Read more >
GitHub Action - Error undefined: No tag found in ref or input
Error undefined: No tag found in ref or input! This is my yml file: # Creates a release whenever a new change gets...
Read more >
Flutter codebase to APK build in GitHub Actions returns ...
Coding example for the question Flutter codebase to APK build in GitHub Actions returns 'undefined: No tag found in ref or input!'-Flutter.
Read more >
7 Github Actions Tricks I Wish I Knew Before I Started
Here we setup a workflow manual dispatch that accepts an input “version”. ... inputs.version }} –tag latest –no-git-tag-version –no-push.
Read more >
git-tag Documentation - Git
If no number is given to -n , only the first line is printed. If the tag is not annotated, the commit message...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found