##[error]Validation Failed Why does this error happen?
This my workflow yaml. I think there is no error. But it always fails. Someone can help me ? Thanks.

# on:
# watch:
# types: [started]
on: push
name: Upload Release Asset
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- uses: uraimo/[email protected]
id: runcmd
with:
architecture: aarch64
distribution: ubuntu18.04
run: |
echo ::set-env name=ARCH::$(uname -m)
echo ::set-output name=ARCH::$(uname -m)
echo ::set-env name=TIME::$(date)
ARCH=$(uname -m)
echo "arch:::",$ARCH
echo "123" >> ${ARCH}.zip
echo `ls`
echo `pwd`
- name: test
run: |
echo ${TIME}
echo "456" > ${ARCH}a.zip
echo `uname -a`
echo `pwd`
echo `ls`
echo ${ARCH}
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCH: ${{ env.ARCH }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCH: ${{ env.ARCH }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${ARCH}.zip
asset_name: ${ARCH}.zip
asset_content_type: application/zip
Update
I figured out my issue. The a release with the same name already existed.
Original issue
I get this too. Relevant yaml:
jobs:
release:
runs-on: ubuntu-latest
name: Release
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: build
<omitted>
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: upload release asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./grax
asset_name: grax
asset_content_type: application/octet-stream
Logs:
##[debug]..Evaluating String:
##[debug]..=> 'ref'
##[debug]=> 'refs/tags/v0.1.0'
##[debug]Result: 'refs/tags/v0.1.0'
##[debug]Evaluating: format('Release {0}', github.ref)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> 'Release {0}'
##[debug]..Evaluating Index:
##[debug]....Evaluating github:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'ref'
##[debug]..=> 'refs/tags/v0.1.0'
##[debug]=> 'Release refs/tags/v0.1.0'
##[debug]Result: 'Release refs/tags/v0.1.0'
##[debug]Loading env
Run actions/create-release@v1
with:
tag_name: refs/tags/v0.1.0
release_name: Release refs/tags/v0.1.0
draft: false
prerelease: false
env:
GITHUB_TOKEN: ***
##[error]Validation Failed
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: create release
Repro: create a release via github.com web-ui. The actions starts because of the tag beeing created behind the scenes. The action tries to create a release with the name the user actualy created just in the step beforehand
Duplicate of #2 and sort of #29, #12.
Repro: create a release via github.com web-ui. The actions starts because of the tag beeing created behind the scenes. The action tries to create a release with the name the user actualy created just in the step beforehand @staabm : You are correct
Steps I followed
- Pushed changes to the to develop branch
- PR Develop to Master
- Merged the PR
- From CLI triggered the below commands (Note it : NOT from WEB Console)
- git tag release_tag
- git push origin release_tag
i.g.
git tag v1.0.15 git push origin v1.0.15
This will solve it.