sky-uk / osprey

Kubernetes OIDC CLI login
BSD 3-Clause "New" or "Revised" License
49 stars 17 forks source link

Add goreleaser #72

Closed zemanlx closed 2 years ago

zemanlx commented 2 years ago

Goreleaser will compile binaries, package them and upload as a release draft go GitHub when there is a tagged build in Travis.

Fixes #62 and #64.

howardburgess commented 2 years ago

Hey @zemanlx I just tagged v2.6.0 and GoReleaser ran but failed. I can look into it, but wondered whether you had any tips? The Travis CI example in GoReleaser doesn't mention how to add a GITHUB_TOKEN.

Installing deploy dependencies
Successfully installed dpl-script-1.10.16
1 gem installed

Preparing deploy

Deploying application
   • releasing...     
   • loading config file file=.goreleaser.yml
   • loading environment variables
   ⨯ release failed after 0.00s error=missing GITHUB_TOKEN, GITLAB_TOKEN and GITEA_TOKEN

Script failed with status 1
failed to deploy

EDIT: I guess it's expecting the env var to be defined in Travis settings. I'll try that.

zemanlx commented 2 years ago

Yes, it needs env GITHUB_TOKEN with repo scope.

https://goreleaser.com/scm/github/

Sorry, I do not have access to Travis-CI to see settings. Adding that token and re-run of that tagged build should release it :crossed_fingers:.

howardburgess commented 2 years ago

Worked perfectly, thanks @zemanlx

https://github.com/sky-uk/osprey/releases/tag/v2.6.0