Skip to content

Commit

Permalink
docs(badgetizr): Add visual badges and fix action description
Browse files Browse the repository at this point in the history
  • Loading branch information
aiKrice committed Dec 5, 2024
1 parent ded24d0 commit a5779d5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/badgetizr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3

- name: Run Badgetizr
uses: aiKrice/homebrew-badgetizr@
uses: aiKrice/homebrew-badgetizr@fix/revamp_script_for_version
with:
pr_id: ${{ github.event.pull_request.number }}
configuration: .badgetizr.yml
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

<h1 align="center">
Badgetizr

![Static Badge](https://img.shields.io/badge/1.4.3-darkgreen?logo=homebrew&logoColor=white&label=Homebrew-tap)
[![Static Badge](https://img.shields.io/badge/1.4.2-grey?logo=github&logoColor=white&label=Github-Action&labelColor=black)](https://github.com/marketplace/actions/badgetizr)
![Static Badge](https://img.shields.io/badge/passed-darkgreen?logo=github&logoColor=white&label=Github&labelColor=black)
![Static Badge](https://img.shields.io/badge/soon-pink?logo=gitlab&logoColor=orange&label=Gitlab&labelColor=white)

</h1>

<h2 align="center">
Expand Down Expand Up @@ -86,7 +92,7 @@ jobs:
uses: actions/checkout@v3

- name: Run Badgetizr
uses: aiKrice/homebrew-badgetizr@1.4.0
uses: aiKrice/homebrew-badgetizr@1.4.1
with:
pr_id: ${{ github.event.pull_request.number }}
configuration: .badgetizr.yml
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Badgetizr'
description: 'A GitHub Action to run Badgetizr for custom PR badges'
description: 'Badgetizr will automatically add visual badges and link shortcuts inside your pull requests to enhance code reviews developer experience.'
branding:
icon: 'award'
color: 'green'
Expand Down
10 changes: 5 additions & 5 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ fi

# Changing the version for -v option
sed -i '' "s|^BADGETIZR_VERSION=.*|BADGETIZR_VERSION=\"$VERSION\"|" "$UTILS_PATH"
git add "$UTILS_PATH"
sed -i '' -E "s/(badge\/)[0-9]+\.[0-9]+\.[0-9]+(-darkgreen\?logo=homebrew)/\${VERSION}\2/" "$README_PATH"
sed -i '' "s|uses: aiKrice/homebrew-badgetizr@.*|uses: aiKrice/homebrew-badgetizr@${VERSION}|" "$WORKFLOW_PATH" "$README_PATH"

git add "$UTILS_PATH" "$WORKFLOW_PATH" "$README_PATH"
git commit -m "Bump version to $VERSION for -v option"
git push
# Step 1: Create the release
Expand Down Expand Up @@ -78,12 +81,9 @@ sed -i "" -E \
-e "s#(sha256 \").*(\".*)#\1$SHA256\2#" \
"$FORMULA_PATH"

# Step 3bis: Update the workflow with new version number
sed -i '' "s|uses: aiKrice/homebrew-badgetizr@.*|uses: aiKrice/homebrew-badgetizr@${NEW_VERSION}|" "$WORKFLOW_PATH"

# Step 4: Commit and push
echo "🟡 [Step 4/5] Commiting the bump of the files..."
git add "$FORMULA_PATH" "$WORKFLOW_PATH"
git add "$FORMULA_PATH"
git commit -m "Bump version $VERSION"
fail_if_error "Failed to commit the bump"
git push --no-verify
Expand Down

0 comments on commit a5779d5

Please sign in to comment.