Skip to content

Commit

Permalink
add the step for creating GH release, and fix typo in filename
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaqiluo committed Jul 1, 2024
1 parent befb1d3 commit fd8e4ad
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
File renamed without changes.
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,41 @@ jobs:
run: |
docker buildx imagetools inspect ${{ env.IMAGE }}:${{ env.TAG_SUC }}
github_release:
runs-on: ubuntu-latest
needs:
- merge
- merge-suc
permissions:
contents: write # needed for creating the GH release
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download binary
uses: actions/download-artifact@v4
with:
pattern: binary-*
path: bin

- name: Prepare release
run: |
mkdir tmp
for DIR in bin/binary-*; do
if [[ -d "$DIR" && -f "$DIR/rancher-system-agent" ]]; then
ARCH=$(echo "$DIR" | awk -F'-' '{print $NF}')
mv "$DIR/rancher-system-agent" "tmp/rancher-system-agent-$ARCH"
fi
done
cp install.sh system-agent-uninstall.sh tmp
mkdir dist
for file in tmp/*; do
sha256sum "$file" >> dist/sha256sum.txt
done
mv tmp/* dist
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release create ${{ github.ref_name }} --verify-tag --generate-notes dist/*

0 comments on commit fd8e4ad

Please sign in to comment.