-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Rovel/add-artifacts
add steps to manually change bin name
- Loading branch information
Showing
1 changed file
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |