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 steps to manually change bin name #15

Merged
merged 1 commit into from
Feb 20, 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
24 changes: 21 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,35 @@ jobs:
with:
path: target
- name: Display structure of downloaded files
run: ls -R
run: ls -
- name: Rename binaries
run: |
for dir in */ ; do
if [ -d "$dir" ]; then
base=$(basename "$dir")
mv "${dir%/}/image_cleaner" "${dir%/}/${dir%/}" # Rename binary to match directory name
fi
done
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare artifact paths
id: prep
run: |
artifacts=""
for dir in */ ; do
if [ -d "$dir" ]; then
artifacts="${artifacts},${dir%/}/${dir%/}" # Append the new binary path
fi
done
artifacts=${artifacts:1} # Remove leading comma
echo "::set-output name=artifacts::$artifacts"
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
artifacts: |
target/*
artifacts: ${{ steps.prep.outputs.artifacts }}
body: ${{ steps.tag_version.outputs.changelog }}