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

Remove file path on automated release note generated #991

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,25 @@ jobs:
minikube start --driver=docker --wait=all
docker buildx create minikube --use --driver=kubernetes --bootstrap
./hack/build-release.sh
# Create release folder to store all the output artifacts
mkdir release
cp ./tmp/release.yml release/release.yml
cd cli
./hack/build-binaries.sh
shasum -a 256 ./kctrl-* | tee -a ../tmp/checksums.txt
cp ./kctrl-* ../release/

- name: Run Package build
run: |
constraintVersion="${{ github.ref_name }}"
./cli/kctrl-linux-amd64 pkg release -y -v ${constraintVersion:1} --debug
mv ./carvel-artifacts/packages/kapp-controller.carvel.dev/metadata.yml ./carvel-artifacts/packages/kapp-controller.carvel.dev/package-metadata.yml
shasum -a 256 ./carvel-artifacts/packages/kapp-controller.carvel.dev/package.yml | tee -a ./tmp/checksums.txt
shasum -a 256 ./carvel-artifacts/packages/kapp-controller.carvel.dev/package-metadata.yml | tee -a ./tmp/checksums.txt

mv ./carvel-artifacts/packages/kapp-controller.carvel.dev/* release/

- name: Add to formatted checksum
run: |
pushd release
shasum -a 256 ./release.yml ./kctrl-* ./package.yml ./package-metada.yml | tee ../tmp/checksums.txt
popd
echo "# :open_file_folder: Files Checksum" | tee ./tmp/checksums-formatted.txt
echo '```' | tee -a ./tmp/checksums-formatted.txt
cat ./tmp/checksums.txt | tee -a ./tmp/checksums-formatted.txt
Expand All @@ -68,11 +73,8 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
body_path: ./tmp/checksums-formatted.txt
files: |
./cli/kctrl-*
./tmp/release.yml
./release/*
./tmp/checksums.txt
./carvel-artifacts/packages/kapp-controller.carvel.dev/package.yml
./carvel-artifacts/packages/kapp-controller.carvel.dev/package-metadata.yml
draft: true
prerelease: true

Expand Down Expand Up @@ -118,14 +120,14 @@ jobs:
}
}
console.log(checksums)
return `${checksums['release.yml']} ./tmp/release.yml
return `${checksums['release.yml']} ./release.yml
${checksums['kctrl-darwin-amd64']} ./kctrl-darwin-amd64
${checksums['kctrl-darwin-arm64']} ./kctrl-darwin-arm64
${checksums['kctrl-linux-amd64']} ./kctrl-linux-amd64
${checksums['kctrl-linux-arm64']} ./kctrl-linux-arm64
${checksums['kctrl-windows-amd64.exe']} ./kctrl-windows-amd64.exe
${checksums['package.yml']} ./carvel-artifacts/packages/kapp-controller.carvel.dev/package.yml
${checksums['package-metadata.yml']} ./carvel-artifacts/packages/kapp-controller.carvel.dev/package-metadata.yml`
${checksums['package.yml']} ./package.yml
${checksums['package-metadata.yml']} ./package-metadata.yml`

- name: Verify uploaded artifacts
if: startsWith(github.ref, 'refs/tags/')
Expand Down
2 changes: 1 addition & 1 deletion hack/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ source $(dirname "$0")/version-util.sh

ytt -f config/ -f config-release -v kapp_controller_version="$(get_kappctrl_ver)" --data-values-env=KCTRL | kbld --imgpkg-lock-output .imgpkg/images.yml -f- > ./tmp/release.yml

shasum -a 256 ./tmp/release*.yml | tee ./tmp/checksums.txt
shasum -a 256 ./tmp/release.yml

echo SUCCESS