Currently I’m migrating my projects to Codeberg. Previously I used Github, and there I created a release process which works really well for me, and I wanted to continue using it. Roughly speaking, it creates a release based on the HEAD commit by tagging it, then it populates the platform’s release metadata via the API and finally appends one or more files to the release which came from the build.
If you sign up for Codeberg, there’s an instance of Woodpecker CI included, so I wanted to use that for my release process. Woodpecker is based on containers, every build step is executed in a container. I put together a lengthy shell script which was executed as a step in an Ubuntu container, and it created the release just as I wanted. So, this was a success 🎉 – but I wasn’t satisfied with having the shell script in my pipeline definition so that I would be copying it over to my other projects. As a software engineer, I adhere to DRY very strongly (with DRY meaning “don’t repeat yourself”).
So I consulted the excellent documentation (yes, you read that right, I didn’t ask any “AI”) and created a custom release plugin for Woodpecker CI. The plugin itself also is a container which gets the workspace mounted in (the documentation also has a small example). I was surprised how easy it was! Absolutely recommend it.
If you want, you can have a look at the resulting Woodpecker plugin (script / image definition / build).