From b731ecdc6f3607ef2e7e6e4a7588fa1d177500b6 Mon Sep 17 00:00:00 2001 From: Filipe Veloso Date: Tue, 20 Feb 2024 01:11:34 -0300 Subject: [PATCH] add steps to manually change bin name --- .github/workflows/ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b62b983..4ac4ad8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/github-tag-action@v6.1 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 }} \ No newline at end of file