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