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

Add setup to generate and upload sha256sum file #3653

Merged
merged 1 commit into from
Aug 16, 2024
Merged
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
17 changes: 14 additions & 3 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,23 @@ jobs:
ls -lR build/bin
env:
CROSS: 1
- name: Generate sha256 file for release
if: github.event_name == 'push' && github.ref_type == 'tag'
run: |
upload_folder="./build/bin"
for filename in $upload_folder/*; do
sum_file=$(sha256sum $filename)
sum=$(echo $sum_file | awk '{print $1}')
file_path=$(echo $sum_file | awk '{print $2}')
file=${file_path#"$upload_folder/"}
echo "$sum $file" >> ./build/bin/sha256sum.txt
done
- name: Upload rke bin artifacts
if: github.event_name == 'push' && github.ref_type == 'tag'
uses: actions/upload-artifact@v4
with:
name: rke-binaries-${{ github.run_number }}-${{ github.run_attempt }}
path: build/bin/rke*
path: build/bin/*
if-no-files-found: error
retention-days: 1

Expand Down Expand Up @@ -86,7 +97,7 @@ jobs:
path: build/bin
- name: Create pre-release
run: |
gh release create ${{ github.ref_name }} -p --verify-tag --title "Pre-release ${{ github.ref_name }}" --notes-file build/bin/rke-k8sversions.txt build/bin/rke*
gh release create ${{ github.ref_name }} -p --verify-tag --title "Pre-release ${{ github.ref_name }}" --notes-file build/bin/rke-k8sversions.txt build/bin/*
env:
GH_TOKEN: ${{ github.token }}

Expand All @@ -107,7 +118,7 @@ jobs:
path: build/bin
- name: Create release
run: |
gh release create ${{ github.ref_name }} --verify-tag --title "Release ${{ github.ref_name }}" --notes-file build/bin/rke-k8sversions.txt build/bin/rke*
gh release create ${{ github.ref_name }} --verify-tag --title "Release ${{ github.ref_name }}" --notes-file build/bin/rke-k8sversions.txt build/bin/*
env:
GH_TOKEN: ${{ github.token }}

Expand Down
Loading