-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand GitHub Actions #816
base: master
Are you sure you want to change the base?
Conversation
Added automatic tag and release to the GitHub Actions
Awesome. |
parens around if statement to only run releases on master. git fetch --tags before requesting next tag
force fetch all tags
doing a non-shallow clone is more efficient than pulling down the history when we get to the new_tag stage
Also getting tags from upstream/parent
Thank you @melroy89! I made those changes, then found out some fun things about github actions. If you want to see an example of what the release page would look like take a look at this fork which will exist until this PR is merged. https://github.com/amarcum/colly/releases This part is for future me and anyone interested in details of git/GitHub Actions. Looks like they only do a shallow clone (with the --depth flag) and without any tag history, and doing a 'git fetch --unshallow --tags' gets you your local forks info, but not the commit history from the upstream/parent fork (like a regular git clone would do). I didn't want to clobber any parent version numbers or start back from v0.0.0, so I am currently adding the upstream of github.com/gocolly/colly in a way that won't fail when it gets merged to the main branch. This gets a better version number, at least in my opinion. |
Hi. I'm actually very familiar with github and github actions. Did you also try to set fetch-tags to true in the action check out? Next to setting the depth. |
I will be away from my PC for at least 12 hours, but I might be able to check my phone throughout the day. Feel free to improve the CI job and we can try out the changes on my fork if you want, or you can create your own if that makes it easier. I am still very much a noob when it comes to GitHub actions! 😂 |
fetch-depth: 0 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action seems to be unmaintained, I wouldn't use it: https://github.com/actions/create-release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe try this fork instead for now: https://github.com/marketplace/actions/gh-release
I thought it would be nice to expand the GitHub Actions to support automatic tag incrementing based on commit messages (using svu) and automatic push of some builds to the release page. I am not sure if this would be of benefit to everyone or not, so feel free to reject the PR. Hopefully it removes the need to think about any version numbers.
I also bumped up the depenencies to be the latest and set the minimum go version to be the same as the oldest version in the existing CI job.
Hopefully this helps! And thank you for an awesome library!