-
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
108 additions
and
3 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,36 @@ | ||
name: Increment Major Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
increment-major: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Read and increment version | ||
run: | | ||
VERSION_FILE=".version" | ||
CURRENT_VERSION=$(cat $VERSION_FILE) | ||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION" | ||
MAJOR=$((MAJOR + 1)) | ||
MINOR=0 | ||
PATCH=0 | ||
NEW_VERSION="$MAJOR.$MINOR.$PATCH" | ||
echo "$NEW_VERSION" > $VERSION_FILE | ||
echo "Version updated to $NEW_VERSION" | ||
- name: Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "CubeDood" | ||
git add .version | ||
git commit -m "Increment major version to $NEW_VERSION" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CUBEDOOD_TOKEN }} |
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,35 @@ | ||
name: Increment Minor Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
increment-minor: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Read and increment version | ||
run: | | ||
VERSION_FILE=".version" | ||
CURRENT_VERSION=$(cat $VERSION_FILE) | ||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION" | ||
MINOR=$((MINOR + 1)) | ||
PATCH=0 | ||
NEW_VERSION="$MAJOR.$MINOR.$PATCH" | ||
echo "$NEW_VERSION" > $VERSION_FILE | ||
echo "Version updated to $NEW_VERSION" | ||
- name: Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "CubeDood" | ||
git add .version | ||
git commit -m "Increment minor version to $NEW_VERSION" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CUBEDOOD_TOKEN }} |
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,34 @@ | ||
name: Increment Patch Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
increment-patch: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Read and increment version | ||
run: | | ||
VERSION_FILE=".version" | ||
CURRENT_VERSION=$(cat $VERSION_FILE) | ||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION" | ||
PATCH=$((PATCH + 1)) | ||
NEW_VERSION="$MAJOR.$MINOR.$PATCH" | ||
echo "$NEW_VERSION" > $VERSION_FILE | ||
echo "Version updated to $NEW_VERSION" | ||
- name: Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "CubeDood" | ||
git add .version | ||
git commit -m "Increment patch version to $NEW_VERSION" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CUBEDOOD_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.111 | ||
0.0.0 |