Skip to content

Commit f60aa6d

Browse files
authored
Merge pull request #57 from bsospace/development
test
2 parents 2afcb36 + 5627e6a commit f60aa6d

5 files changed

Lines changed: 48 additions & 7 deletions

File tree

.github/workflows/bump-and-release.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ jobs:
9292
9393
# === DEVELOPMENT ===
9494
elif [ "$TARGET_BRANCH" == "development" ]; then
95-
if [[ "$CURRENT_VERSION" == *"-dev."* ]]; then
95+
if [[ "$CURRENT_VERSION" == *"-dev."* || "$SOURCE_BRANCH" == "main" ]]; then
9696
LAST_NUM=${CURRENT_VERSION##*.}
9797
NEXT_NUM=$((LAST_NUM + 1))
9898
NEW_VERSION="${BASE_VERSION}-dev.${NEXT_NUM}"
9999
else
100-
NEW_VERSION="${BASE_VERSION}-dev.1"
100+
NEW_VERSION="$MAJOR.$((MINOR + 1)).0-dev.1"
101101
fi
102102
echo "Strategy: Dev increment"
103103
else
@@ -113,11 +113,19 @@ jobs:
113113
NEW_VERSION=${{ steps.new_version.outputs.version }}
114114
TAG_NAME="v$NEW_VERSION"
115115
116-
echo "Pushing tag $TAG_NAME"
116+
npm version "$NEW_VERSION"
117+
118+
git push --follow-tags
119+
# - name: Push New Tag
120+
# run: |
121+
# NEW_VERSION=${{ steps.new_version.outputs.version }}
122+
# TAG_NAME="v$NEW_VERSION"
123+
124+
# echo "Pushing tag $TAG_NAME"
117125

118-
git tag -a "$TAG_NAME" -m "Release $TAG_NAME"
119-
# Token ถูก set ตั้งแต่ checkout แล้ว จึง push ได้เลย
120-
git push origin "$TAG_NAME"
126+
# git tag -a "$TAG_NAME" -m "Release $TAG_NAME"
127+
# # Token ถูก set ตั้งแต่ checkout แล้ว จึง push ได้เลย
128+
# git push origin "$TAG_NAME"
121129

122130
- name: Create GitHub Release
123131
uses: softprops/action-gh-release@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<title>Document</title>
77
</head>
88
<body>
9-
<h1>Test version hotfix</h1>
9+
<h1>Test version</h1>
1010
</body>
1111
</html>

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "version-bump",
3+
"version": "0.10.0-dev.6",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/bsospace/version-bump.git"
12+
},
13+
"author": "",
14+
"license": "ISC",
15+
"bugs": {
16+
"url": "https://github.com/bsospace/version-bump/issues"
17+
},
18+
"homepage": "https://github.com/bsospace/version-bump#readme"
19+
}

0 commit comments

Comments
 (0)