I am trying to create a GitHub action that will detect when a change has happened on a certain branch and then build a release. The problem I’m getting is that in my yml file I use this line:
ncipollo/release-action@v1. This requires a tag to be available otherwise it will fail. I have created and pushed a tag but when I run the action I get this error
Error undefined: No tag found in ref or input!
This is my yml file:
# Creates a release whenever a new change gets pushed onto the dev branch
# https://github.com/ncipollo/release-action
name: Dev-Build
on:
push:
branches:
- dev
jobs:
build:
name: setup environment
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache node modules
uses: actions/cache@v2.1.3
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.4.4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm i
npm run build:ci
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.TOKEN }}