-
Hey everyone, I recently got into CI and saw the way it allows for Artefacts to be used. What I would like to do is:
I am currently on 30ish failed updated .yml files. The project I am working on is: https://github.com/Laemers/BattleNavHelper
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
By default, the push event is available to pushes to branches and pushes to tags.
However, if you only define branches filter (branches or branches-ignore), the workflow won’t be triggered when you push to tags. similarly, if your only define tags filter (tags or tags-ignore), the workflow won’t be triggered when you push to branches. If you want the workflow will be triggered when you push to some specified branches or tags, you need to add both branches filter and tags filter on push event.
About generating auto-incrementing build/release number, I found the following actions from the GitHub Marketplace, you can use one of them in your workflow: According to your requests, you can reference the demo below to configure your workflow.
|
Beta Was this translation helpful? Give feedback.
-
Hey @brightran. Thank you so much for helping me on the last part. I have advanced a bit now and I currently the following. But first, let me explain the situation:
The So when I push using a tag, say for instance Maybe it’s a problem as I use windows-latest on the build part and ubuntu for the other parts?
|
Beta Was this translation helpful? Give feedback.
-
Which step do you get this error in? Manually create tag on GitHub Desktop, or run some step in the workflow?
As far as your case is concerned, I don’t think these will have any affect. In addition, GitHub has provided an official action for users to create release (actions/create-release), you can directly use this action to create a release with the tag that you get from the “get_tag” job. |
Beta Was this translation helpful? Give feedback.
-
The error is given in the workflow. Adding a tag on Github desktop works, and allows me to push this change. Since I am not filtering for branches or tags, the workflow should trigger on each commit. So what I did was, create commit, add a tag, and then push it using Github Desktop. |
Beta Was this translation helpful? Give feedback.
-
But I see you have set branches filter on push event in your workflow.
This will trigger the workflow when you push commits to master branch. Pushes to tags will not trigger the workflow. As I mentioned abouve,
When you push commits to master branch, the git ref (github.ref) is ‘refs/heads/master’, it is a branch ref, not tag ref. You can’t directly release a branch ref. You can try like as below:
OR
In addition, you have get the tag name from the “get_tag” job, you can directly use this tag name to release. |
Beta Was this translation helpful? Give feedback.
@PloxKevin,
But I see you have set branches filter on push event in your workflow.
This will trigger the workflow when you push commits to master branch. Pushes to tags will not trigger the workflow. As I mentioned abouve,
When you push commits to master branch, the git ref (github.ref) is ‘refs/heads/master