-
Notifications
You must be signed in to change notification settings - Fork 293
feat: Transparent release process #480
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check versions | ||
run: | | ||
version=$(grep "^version:" plugin.yaml | cut -d '"' -f 2) | ||
if [ "${GITHUB_REF_NAME}" != "v${version}" ]; then | ||
echo '::error::Version mismatch' | ||
exit 1 | ||
fi | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
- uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ release/ | |
.envrc | ||
.idea | ||
docker-run-release-cache/ | ||
dist/ |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,51 @@ | ||||
--- | ||||
# Make sure to check the documentation at https://goreleaser.com | ||||
before: | ||||
hooks: | ||||
# Keep mod files clean | ||||
- go mod tidy -v | ||||
|
||||
builds: | ||||
- main: main.go | ||||
binary: bin/diff | ||||
env: | ||||
- CGO_ENABLED=0 | ||||
flags: -trimpath | ||||
ldflags: -s -w -X {{ .ModulePath }}/cmd.Version={{ .Version }} | ||||
targets: | ||||
# helm supported targets | ||||
# https://github.com/helm/helm/blob/main/Makefile#L4C1-L4C1 | ||||
- darwin_amd64 | ||||
- darwin_arm64 | ||||
- linux_386 | ||||
- linux_amd64 | ||||
- linux_arm | ||||
- linux_arm64 | ||||
- linux_ppc64le | ||||
- linux_s390x | ||||
- windows_amd64 | ||||
# additional targets | ||||
- freebsd_amd64 | ||||
|
||||
archives: | ||||
- format: tgz | ||||
name_template: '{{ .ProjectName }}-{{ tolower .Os }}-{{ .Arch }}' | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It turned out we had to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is correct - I missed this. |
||||
wrap_in_directory: diff | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't need this wrapping, because our installation script doesn't expect it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All files in latest release are wrapped into Line 126 in f5cb542
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are absolutely correct @bonddim! Thank you very much for the confirmation and the correction. You saved the day! |
||||
files: | ||||
- README.md | ||||
- LICENSE | ||||
- plugin.yaml | ||||
|
||||
checksum: | ||||
name_template: 'checksums.txt' | ||||
|
||||
snapshot: | ||||
name_template: '{{ incpatch .Version }}-{{ .ShortCommit }}' | ||||
|
||||
changelog: | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I missed this in my PR so let me check later! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't required for releases, but I like this snapshot versioning |
||||
sort: asc | ||||
filters: | ||||
exclude: | ||||
- '^chore:' | ||||
- '^docs:' | ||||
- '^test:' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ fi | |
|
||
git tag $1 | ||
git push origin $1 | ||
gh release create $1 --draft --generate-notes --title "$1" release/*.tgz | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! Today, the release process looks like the below:
After this and #517, the process would look like:
I guess we'd rather prefer the below:
Maybe we can modify this release.sh to do the second bullet point? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not missing anything, we can safely omit
386
,arm
,ppc64le
ands390x
"yet" as we don't publish binaries for those archs today.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just included all architectures supported by Helm.
Yes, its safe to omit them, but why to not include them now?