Closed osmollo closed 4 years ago
I've seen in #12 which one was my problem, the trigger.
I've changed my jobs:
release.yml: for create a new release with every change in master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
go_release.yml: for build and upload the file to release created previously
on:
release:
types: [created]
But it's not working, github only run the release.yml jobs. However, I already know what my mistake was
Thanks and best regards
The release: types: [created]
event will be triggerred when you create a new release on https://github.com/ohermosa/gorkscrew/releases, so that the new created release will be the target storage for the built binaries. Also, below items are not necessary in your https://github.com/ohermosa/gorkscrew/blob/master/.github/workflows/go_release.yml:
needs: create_release
: they're no relationship; uses: actions/upload-release-asset@v1
: all the upload process has been done in this go-release-action
Please remove them, and try to create a new release page to see its running.
Thank you very much!
I've deleted both items (i forget to clean useless in the last commit) but the workflow go_release.yml
is not executed after create the new release.
That's other problem that i will have to debug
Again, thank you very much for your help. I'll close the issue
Regards
It finally works!! This is what i have done if it helps another users:
I found this post. Basically, with the default github token has the limitation that one workflow can't run another one. I've create my own token and save it in "secrets" section. I have used it in both workflows (create_release and go_build) and it works!
Thank yo so much again
I use https://github.com/release-drafter/release-drafter to build release automatically, and although I have used a custom configured token, I still can't build binary properly
Hi,
I'm trying to build the go binary of my little repo (https://github.com/ohermosa/gorkscrew) using your github action but it crash uploading the file to github.
I get the following log of the job execution:
I guess the problem is in this part:
Where from this file event.json is?
Thanks and best regards