Skip to content
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

github action to release and automagically update version and sha #11

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

lalyos
Copy link
Contributor

@lalyos lalyos commented Sep 11, 2020

This PR adds a new github action workflow:

  • if there is a new tag matching vX.Y.Z
  • create a new release to store examples.tar.gz of all yaml for the krew plugin
  • commits an updated examples.yaml (krew plugin descriptor) with updated version num and shasum

Usage

Once it's merged you just create a new tag (starting with "v") on master, and the workflow does the rest:

  • creates a new release matching your tag
  • updates the plugins/examples.yaml krew manifest and commits it to master

See it in action

I have tested it on my own fork, see the result:

  • See the successful workflow run logs
  • the release created bu the action: release v0.0.3
  • the commit on master (by github action) fixing url version and shasum: lalyos@ad209ba

Notes

I was trying to use the action: github.com/stefanzweifel/git-auto-commit-action but it seems
this plugin cannot handle pushing to a different branch. It is triggered by the git tag,
so it will be a "detached head" and than couldn't handle switching to the master branch.

see: action error

So I ended up duck-taping a bunch of git command to implement a safe switch to master.

@ianmiell ianmiell merged commit 69b0545 into ContainerSolutions:master Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants