File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [tool .bumpversion ]
2+ current_version = " 0.0.0"
3+ parse = " (?P<major>\\ d+)\\ .(?P<minor>\\ d+)\\ .(?P<patch>\\ d+)"
4+ serialize = [
5+ " {major}.{minor}.{distance_to_latest_tag}"
6+ ]
7+ search = " {current_version}"
8+ replace = " {new_version}"
9+ regex = false
10+ ignore_missing_version = false
11+ ignore_missing_files = false
12+ tag = false
13+ sign_tags = false
14+ tag_name = " v{new_version}"
15+ tag_message = " Bump version: {current_version} → {new_version}"
16+ allow_dirty = false
17+ commit = false
18+ message = " Bump version: {current_version} → {new_version}"
19+ commit_args = " "
20+ setup_hooks = []
21+ pre_commit_hooks = []
22+ post_commit_hooks = []
23+ [[tool .bumpversion .files ]]
24+ filename = " frontend/package.json"
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ name: CI
33on :
44 push :
55 branches : [ main ]
6+ workflow_run :
7+ workflows : ["Bump version and create release"]
8+ types :
9+ - completed
610 workflow_dispatch : # allow manual start
711
812concurrency :
1620 steps :
1721 - name : Checkout
1822 uses : actions/checkout@v6
23+ with :
24+ fetch-depth : 0
25+
26+ # - name: Bump patch version
27+ # uses: callowayproject/bump-my-version@master
28+ # with:
29+ # args: patch --no-commit --verbose
30+ - uses : actions/setup-python@v5
31+ with :
32+ python-version : ' 3.12'
33+ - run : |
34+ python -m pip install --upgrade pip
35+ python -m pip install click==8.2 bump-my-version==0.32.2
36+ - name : Bump patch version
37+ run : bump-my-version bump patch --no-commit --verbose
1938
2039 - name : Setup Node.js
2140 uses : actions/setup-node@v6
2645 working-directory : frontend
2746 run : npm ci
2847
48+ - name : Env
49+ working-directory : frontend
50+ run : echo "VITE_BASE_PATH=/OpenNumismatWeb/dev/" > .env.local
51+
2952 - name : Build
3053 working-directory : frontend
3154 run : npm run build
3558 with :
3659 github_token : ${{ secrets.GITHUB_TOKEN }}
3760 publish_dir : ./frontend/dist
61+ destination_dir : dev
Original file line number Diff line number Diff line change 1+ name : Bump version and create release
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ bump-type :
7+ description : ' What kind of release is this?'
8+ required : false
9+ default : ' minor'
10+ type : choice
11+ options :
12+ - ' major'
13+ - ' minor'
14+
15+ jobs :
16+ release :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v6
22+
23+ - run : git config --global user.name "github-actions[bot]"
24+ - run : git config --global user.email "github-actions[bot]@users.noreply.github.com"
25+
26+ - name : Bump version
27+ id : bump
28+ uses : callowayproject/bump-my-version@master
29+ env :
30+ BUMPVERSION_TAG : " true"
31+ with :
32+ args : ${{ inputs.bump-type }} --commit --verbose
33+ github-token : ${{ secrets.GITHUB_TOKEN }}
34+
35+ - name : Setup Node.js
36+ uses : actions/setup-node@v6
37+ with :
38+ node-version : 24
39+
40+ - name : Install dependencies
41+ working-directory : frontend
42+ run : npm ci
43+
44+ - name : Build
45+ working-directory : frontend
46+ run : npm run build
47+
48+ - name : Deploy to GitHub Pages
49+ uses : peaceiris/actions-gh-pages@v3
50+ with :
51+ github_token : ${{ secrets.GITHUB_TOKEN }}
52+ publish_dir : ./frontend/dist
53+
54+ - name : Create GitHub release
55+ uses : softprops/action-gh-release@v2
56+ with :
57+ tag_name : v${{ steps.bump.outputs.current-version }}
58+ draft : true
You can’t perform that action at this time.
0 commit comments