forked from leifos-gmbh/UHShibAuth
-
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
Showing
5 changed files
with
66 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Get the latest version (assuming it's stored in a file or as a Git tag) | ||
latest_version=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
|
||
# Check if latest_version is not empty | ||
if [ -z "$latest_version" ]; then | ||
echo "Error: Could not determine latest version." | ||
exit 1 | ||
fi | ||
|
||
# Update the README.md file | ||
sed -i "/^## Version/{N;s/.*/## Version\n$latest_version/}" README.md | ||
|
||
|
||
# Check if README was updated | ||
if ! git diff --exit-code --quiet README.md; then | ||
# Configure Git (Replace with your details) | ||
git config --global user.email "fadi@asbih.com" | ||
git config --global user.name "Fadi Asbih" | ||
|
||
# Add and commit changes | ||
git add README.md | ||
git commit -m "chore: update version in README to $latest_version" | ||
else | ||
echo "No changes to README.md" | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
with: | ||
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | ||
release-type: simple | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Fetches all history for all branches and tags | ||
|
||
- name: Update README Version | ||
run: bash .github/scripts/update_readme_version.sh | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: main |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea/ |
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
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