<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Go on Mike Bell - Blog &amp; Stuff</title><link>https://mikebell.io/categories/go/</link><description>Recent content in Go on Mike Bell - Blog &amp; Stuff</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>hello@mikebell.io (Mike Bell)</managingEditor><webMaster>hello@mikebell.io (Mike Bell)</webMaster><copyright>© 2026 Mike Bell</copyright><lastBuildDate>Sun, 12 Apr 2026 11:07:39 +0000</lastBuildDate><atom:link href="https://mikebell.io/categories/go/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Goreleaser with ForgeJo</title><link>https://mikebell.io/posts/goreleaser-forgejo/</link><pubDate>Sun, 12 Apr 2026 11:07:39 +0000</pubDate><author>hello@mikebell.io (Mike Bell)</author><guid>https://mikebell.io/posts/goreleaser-forgejo/</guid><description>
&lt;p>For my resound app I wanted a really nice release process (it is after all part of my job!). Resound is a cli go app built with Cobra and Viper, it takes the last RSS item and posts it to Mastodon, pretty simple. You can checkout the latest version &lt;a
href="https://code.remotelab.uk/mikebell/resound/releases"
target="_blank"
>here&lt;/a>. I&amp;rsquo;m using goreleaser to build multiple architectures and then push them to my ForgeJo instance here&amp;rsquo;s how I did it because there are a lot of moving parts you have to put together in order to get it working.&lt;/p>
&lt;h2 class="relative group">tldr;
&lt;div id="tldr" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#tldr" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;ul>
&lt;li>&lt;a
href="https://code.remotelab.uk/mikebell/resound/src/branch/main/.forgejo/workflows/build-package.yaml"
target="_blank"
>build-package.yaml&lt;/a>&lt;/li>
&lt;li>&lt;a
href="https://code.remotelab.uk/mikebell/resound/src/branch/main/.goreleaser.yaml"
target="_blank"
>.goreleaser.yaml&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 class="relative group">ForgeJo Action
&lt;div id="forgejo-action" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#forgejo-action" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;pre tabindex="0">&lt;code>- name: Run GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7
with:
# either &amp;#39;goreleaser&amp;#39; (default) or &amp;#39;goreleaser-pro&amp;#39;
distribution: goreleaser
# &amp;#39;latest&amp;#39;, &amp;#39;nightly&amp;#39;, or a semver
version: &amp;#39;~&amp;gt; v2&amp;#39;
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
&lt;/code>&lt;/pre>&lt;p>Important part here is the make sure &lt;code>uses:&lt;/code> uses the FQDN of the action and that your passing in &lt;code>GITEA_TOKEN&lt;/code> from your repo secrets. I have the following token with these options scope to the repo:&lt;/p>
&lt;ul>
&lt;li>write:package&lt;/li>
&lt;li>write:repository&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Note: this can probably be scoped even smaller.&lt;/p>&lt;/blockquote>
&lt;h2 class="relative group">.goreleaser.yaml
&lt;div id="goreleaseryaml" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#goreleaseryaml" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>You can view the full version in the tldr above but here are the important parts:&lt;/p>
&lt;pre tabindex="0">&lt;code>release:
gitea:
owner: mikebell
name: resound
footer: &amp;gt;-
&lt;/code>&lt;/pre>&lt;p>You have to set the &lt;code>owner&lt;/code> and repo &lt;code>name&lt;/code> under &lt;code>gitea&lt;/code> in &lt;code>release&lt;/code>. This tells goreleaser where to put the output.&lt;/p>
&lt;pre tabindex="0">&lt;code>gitea_urls:
api: https://code.remotelab.uk/api/v1
download: https://code.remotelab.uk
&lt;/code>&lt;/pre>&lt;p>You then have to define your ForgeJo instance, goreleaser doesn&amp;rsquo;t officially support ForgeJo but the api is compatible with gitea.&lt;/p>
&lt;pre tabindex="0">&lt;code>force_token: gitea
&lt;/code>&lt;/pre>&lt;p>I then had to force the token to gitea because goreleaser automatically tries to work out which forge your using and there&amp;rsquo;s already a &lt;code>GITHUB_TOKEN&lt;/code> passed by default.&lt;/p>
&lt;hr>
&lt;p>Once I had all this in place I can create a tag from either the ForgeJo UI or through git and my action will create the packages and upload them to a new release you can see 1.1.0 of resound &lt;a
href="https://code.remotelab.uk/mikebell/resound/releases/tag/1.1.0"
target="_blank"
>here&lt;/a>.&lt;/p>
&lt;p>Hope this helps.&lt;/p>
&lt;p>Thanks for reading via RSS!&lt;/p>
&lt;p>Send me a message on &lt;a href="https://remotelab.uk/mikebell">Mastodon&lt;/a> or &lt;a href="mailto:hello@mikebell.io">email me&lt;/a>&lt;/p></description></item></channel></rss>