-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump CasperWA/push-protected from v1 to v2 (#51)
Update workflow for use with push-protected@v2. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Casper Welzel Andersen <casper.andersen@epfl.ch>
- Loading branch information
1 parent
4f57573
commit e00d9dc
Showing
2 changed files
with
35 additions
and
37 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 |
---|---|---|
@@ -1,19 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
echo "\n### Checkout fresh branch ###" | ||
git checkout -b update_version | ||
|
||
echo "\n### Setting commit user ###" | ||
echo -e "\n### Setting commit user ###" | ||
git config --local user.email "dev@optimade.org" | ||
git config --local user.name "OPTIMADE Developers" | ||
|
||
echo "\n### Install invoke ###" | ||
pip install invoke | ||
|
||
echo "\n### Update version in README ###" | ||
echo -e "\n### Update version ###" | ||
invoke setver --ver="${GITHUB_REF#refs/tags/}" | ||
|
||
echo "\n### Commit update ###" | ||
git add README.md | ||
git commit -m "Release ${GITHUB_REF#refs/tags/}" | ||
echo -e "\n### Commit update ###" | ||
git commit -am "Release ${GITHUB_REF#refs/tags/}" | ||
|
||
echo -e "\n### Create new full version (v<MAJOR>.<MINOR>.<PATCH>) tag ###" | ||
TAG_MSG=.github/update_version/release_tag_msg.txt | ||
sed -i "s|TAG_NAME|${GITHUB_REF#refs/tags/}|g" "${TAG_MSG}" | ||
git tag -af -F "${TAG_MSG}" ${GITHUB_REF#refs/tags/} | ||
|
||
echo -e "\n### Move/update v<MAJOR> tag ###" | ||
MAJOR_VERSION=$( echo ${GITHUB_REF#refs/tags/v} | cut -d "." -f 1 ) | ||
TAG_MSG=.github/update_version/major_version_tag_msg.txt | ||
sed -i "s|MAJOR|${MAJOR_VERSION}|g" "${TAG_MSG}" | ||
git tag -af -F "${TAG_MSG}" v${MAJOR_VERSION} |
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