-
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.
- Loading branch information
1 parent
693f134
commit e3ddfa9
Showing
1 changed file
with
24 additions
and
24 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 |
---|---|---|
|
@@ -88,27 +88,27 @@ jobs: | |
- name: Generate documentation | ||
run: cargo doc --no-deps --document-private-items | ||
|
||
# Increment version | ||
- name: Increment version | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
run: | | ||
cargo install cargo-bump | ||
cargo bump patch | ||
NEW_VERSION=$(grep -m1 version Cargo.toml | cut -d '"' -f2) | ||
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV | ||
# Update README.md with new version | ||
- name: Update README.md | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
run: | | ||
sed -i 's/img.shields.io\/crates\/v\/isotopes.svg/img.shields.io\/badge\/version-'"$NEW_VERSION"'-blue/' README.md | ||
# Commit and push changes | ||
- name: Commit and push changes | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add Cargo.toml README.md | ||
git commit -m "Bump version to $NEW_VERSION" | ||
git push | ||
# # Increment version | ||
# - name: Increment version | ||
# if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
# run: | | ||
# cargo install cargo-bump | ||
# cargo bump patch | ||
# NEW_VERSION=$(grep -m1 version Cargo.toml | cut -d '"' -f2) | ||
# echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV | ||
|
||
# # Update README.md with new version | ||
# - name: Update README.md | ||
# if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
# run: | | ||
# sed -i 's/img.shields.io\/crates\/v\/isotopes.svg/img.shields.io\/badge\/version-'"$NEW_VERSION"'-blue/' README.md | ||
|
||
# # Commit and push changes | ||
# - name: Commit and push changes | ||
# if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
# run: | | ||
# git config --local user.email "[email protected]" | ||
# git config --local user.name "GitHub Action" | ||
# git add Cargo.toml README.md | ||
# git commit -m "Bump version to $NEW_VERSION" | ||
# git push |