Automated release using GH Actions#60
Conversation
|
This feels especially necessary given the upcoming serial addition (and likely downstream modifications) of several LFRic-UGRID files. |
jamesp
left a comment
There was a problem hiding this comment.
Super cool! A couple of questions inline
| git pull | ||
| export CURRENT_VERSION=$(cat version.txt) | ||
| export THIS_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS=. '{$NF++;print}') | ||
| echo "THIS_VERSION=$THIS_VERSION" >> $GITHUB_ENV |
There was a problem hiding this comment.
Is there an advantage to doing this over using the actions output syntax? https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs
There was a problem hiding this comment.
Not that I'm aware of.
Is there an advantage to using the actions output syntax over the actions env syntax?
There was a problem hiding this comment.
No idea! :) Either way looks like it works
.github/workflows/release.yml
Outdated
| env: | ||
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
| with: | ||
| args: v${{ env.THIS_VERSION }} v${{ env.THIS_VERSION }} |
There was a problem hiding this comment.
The first argument sets the release name, the second argument sets the tag value. It seems we're in a pattern of using the same value for both with our historic releases.
(If the second argument is missing, it gets filled with something else autogenerated).
|
Could we possibly generate a personal access token using the @SciTools-assistant ? |
|
I'm not sure why it is different, but this action https://github.com/softprops/action-gh-release can use the |
@jamesp elgohr/Github-Release-Action@1b08dc1 Perhaps it would be worth me trying this alternative Action you've referenced... |
|
I wonder if this is because this action does things in a docker container? did you try it with |
@jamesp good shout - I just tried but it didn't work 👎 However it was an easy switch to use the softprops Action (d7a55e8), and that did work 👍. I also approve of their more helpful README, and their liberal use of emoji's - very GitHub! So: this PR no longer needs any extra actions before merging. |
bjlittle
left a comment
There was a problem hiding this comment.
@trexfeathers Awesome 🚀
LGTM. Lovely stuff! 😍
SciTools/iris#4024 means that Iris now expects to reference a specific release of iris-test-data. This effectively means any change to iris-test-data should involve a release.
So here is a proposal for a GitHub Action that creates a new release every time a push is made to
master.The below is no longer needed since d7a55e8.
### Help neededFor the Action to work, aRELEASE_TOKENis needed. Someone with admin permissions for the repo will need to do this:- Create an access token withpublic_reposcope:- Create a new repo secret calledRELEASE_TOKEN, set the value to that of the above access token.