Skip to content

Commit f3d6a31

Browse files
committed
Update workflow & documentation
1 parent 226ce51 commit f3d6a31

File tree

3 files changed

+122
-40
lines changed

3 files changed

+122
-40
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
11
on:
22
push:
3-
branches:
4-
- "!*"
53
tags:
6-
- "v*"
4+
- "v[0-9]+.[0-9]+.[0-9]+"
75

86
name: Release
97

108
jobs:
11-
build:
9+
release:
10+
# Note: `github.event.base_ref` is equal to `refs/heads/main` when the workflow is triggered
11+
# by a branch, or a lightweight tag (_not_ an annotated tag), placed on the last commit of the `main` branch
12+
if: github.event.base_ref == 'refs/heads/main'
13+
1214
runs-on: ubuntu-latest
1315

1416
steps:
1517
- name: Set up Python
16-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v6
1719
with:
18-
python-version: '3.x'
20+
python-version: '3.11'
1921

2022
- name: Install dependencies
2123
run: |
2224
python -m pip install --upgrade pip
2325
pip install requests
2426
25-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
2628
with:
2729
lfs: true
2830

2931
- name: Checkout LFS objects
3032
run: git lfs checkout
3133

3234
- name: Checkout blender_mmd_assets
33-
uses: actions/checkout@v2
35+
uses: actions/checkout@v4
3436
with:
3537
repository: MMD-Blender/blender_mmd_assets
3638
path: blender_mmd_assets
@@ -43,34 +45,37 @@ jobs:
4345
- name: Copy LICENSE file
4446
run: cp -p LICENSE mmd_tools_append/
4547

46-
- name: Build project
47-
run: zip -r -9 artifact.zip mmd_tools_append/
48+
- name: Remove development-only files
49+
run: rm -rf mmd_tools_append/typings
50+
51+
- name: Generate zip filename
52+
run: |
53+
declare -A tag_prefix_to_blender_version=(
54+
["v1"]="bl3.6"
55+
["v4"]="bl4.2"
56+
)
57+
blender_version=${tag_prefix_to_blender_version[${GITHUB_REF_NAME%%.*}]}
58+
if [ -z "$blender_version" ]; then
59+
echo "Error: No Blender version mapping found for tag ${GITHUB_REF_NAME}"
60+
exit 1
61+
fi
62+
echo "zip_filename=mmd_tools-${GITHUB_REF_NAME}-${blender_version}.zip" >> $GITHUB_ENV
63+
64+
- name: Create a zip
65+
run: |
66+
(
67+
cd mmd_tools_append &&
68+
find . -type f ! -path "*/.*" ! -path "*/__pycache__/*" -print |
69+
zip -9r "../${{ env.zip_filename }}" -@
70+
)
4871
4972
- name: Create a Release
5073
id: create_release
51-
uses: actions/create-release@v1
52-
env:
53-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
uses: softprops/action-gh-release@v2
5475
with:
55-
tag_name: ${{ github.ref }}
56-
release_name: Release ${{ github.ref }}
76+
name: Release ${{ github.ref_name }}
77+
tag_name: ${{ github.ref_name }}
78+
files: ${{ env.zip_filename }}
5779
draft: true
80+
generate_release_notes: true
5881
prerelease: false
59-
60-
- name: Branch name
61-
id: branch_name
62-
run: |
63-
echo ::set-output name=name::${GITHUB_REF#refs/*/}
64-
echo ::set-output name=branch::${GITHUB_REF#refs/heads/}
65-
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
66-
67-
- name: Upload Release Asset
68-
id: upload-release-asset
69-
uses: actions/upload-release-asset@v1
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.SuperSecret }}
72-
with:
73-
upload_url: ${{ steps.create_release.outputs.upload_url }}
74-
asset_path: ./artifact.zip
75-
asset_name: mmd_tools_append-${{ steps.branch_name.outputs.tag }}.zip
76-
asset_content_type: application/zip

DEVELOPER_GUIDE.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# MMD Tools Append Developer Guide
2+
3+
This guide gives a quick, practical overview for contributors.
4+
If something is not stated here, follow the main [MMD Tools Developer Guide](https://github.com/MMD-Blender/blender_mmd_tools/blob/main/DEVELOPER_GUIDE.md).
5+
6+
## Project Scope
7+
8+
### Core Principles
9+
- Stay lightweight (only append / enhance assets, do not duplicate MMD Tools core)
10+
- Prefer reuse over re‑implementation
11+
12+
### Supported Features
13+
1. Asset search & append
14+
2. TBD
15+
16+
### Out of Scope
17+
1. **MMD Core Functionality** - Should be implemented in [MMD Tools](https://github.com/MMD-Blender/blender_mmd_tools)
18+
19+
## Development Environment
20+
21+
### Prerequisites
22+
- Ensure you have a matching version of Blender for the target development branch
23+
- Use the correct Python version for your Blender release
24+
- Get GitHub access to the [MMD Tools Append repository](https://github.com/MMD-Blender/blender_mmd_tools_append)
25+
26+
| Blender Version | MMD Tools Append Version | Python Version | Branch |
27+
|-----------------|--------------------------|---------------:|-------------|
28+
| Blender 4.5 LTS | MMD Tools Append v4.x | 3.11 | [main](https://github.com/MMD-Blender/blender_mmd_tools_append) |
29+
| Blender 3.6 LTS | MMD Tools Append v1.x | 3.10 | [blender-v3](https://github.com/MMD-Blender/blender_mmd_tools_append/tree/blender-v3) |
30+
31+
## Project Structure
32+
```
33+
blender_mmd_tools_append/
34+
├── mmd_tools_append/
35+
│ ├── asset_search/ # Asset search & append
36+
│ ├── checkers/ # Validation utilities
37+
│ ├── converters/ # Focused data transforms
38+
│ ├── editors/ #
39+
│ ├── externals/ # Vendored 3rd-party (each with README.txt)
40+
│ ├── generators/ #
41+
│ ├── tuners/ #
42+
│ └── typings/ # .pyi type hints
43+
└── docs/ # (Reserved)
44+
```
45+
46+
## Coding Standards
47+
48+
### Python Style
49+
- Add the following comment block at the top of each Python file:
50+
```
51+
# Copyright {year} MMD Tools Append authors
52+
# This file is part of MMD Tools Append.
53+
```
54+
- Follow [MMD Tools Python Style](https://github.com/MMD-Blender/blender_mmd_tools/blob/main/DEVELOPER_GUIDE.md#python-style)
55+
56+
## Release Process
57+
Currently, only @UuuNyaa has permission to perform release tasks:
58+
59+
1. Tag the commit in `main` with the version number (`vMAJOR.MINOR.PATCH`)
60+
2. Pushing the tag triggers a GitHub Action that builds artifacts and creates a draft release
61+
3. Manually finalize and publish the GitHub Release draft
62+
4. Manually upload the artifacts to [Blender Extensions](https://extensions.blender.org/add-ons/mmd-tools-append/)

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,43 @@
1-
# mmd_tools_append (formerly mmd_uuunyaa_tools)
2-
mmd_tools_append is a blender addon for adjust scenes, models and materials in concert with [MMD-Blender/blender_mmd_tools](https://github.com/MMD-Blender/blender_mmd_tools).
1+
# MMD Tools Append (formerly MMD UuuNyaa Tools)
2+
MMD Tools Append is a blender addon for adjust scenes, models and materials in concert with [MMD-Blender/blender_mmd_tools](https://github.com/MMD-Blender/blender_mmd_tools).
3+
4+
MMD Tools Appendは[MMD-Blender/blender_mmd_tools](https://github.com/MMD-Blender/blender_mmd_tools)と連携してシーン、モデル、マテリアルを調整するためのBlenderアドオンです。
5+
6+
7+
## Version Compatibility
8+
| Blender Version | MMD Tools Append Version | Branch |
9+
|-----------------|---------------------------|-------------|
10+
| Blender 4.5 LTS | MMD Tools Append v4.x | [main](https://github.com/MMD-Blender/blender_mmd_tools_append) |
11+
| Blender 3.6 LTS | MMD Tools Append v1.x | [blender-v3](https://github.com/MMD-Blender/blender_mmd_tools_append/tree/blender-v3) |
312

4-
mmd_tools_appendは[MMD-Blender/blender_mmd_tools](https://github.com/MMD-Blender/blender_mmd_tools)と連携してシーン、モデル、マテリアルを調整するためのBlenderアドオンです。
513

614
## Installation & Usage
7-
- Check [the mmd_tools_append wiki!](https://github.com/MMD-Blender/blender_mmd_tools_append/wiki/Home) for details.
8-
- 詳細は [mmd_tools_appendのwiki! (日本語)](https://github.com/MMD-Blender/blender_mmd_tools_append/wiki/Home.ja) を確認してください。
15+
- Check [the MMD Tools Append wiki!](https://github.com/MMD-Blender/blender_mmd_tools_append/wiki/Home) for details.
16+
- 詳細は [MMD Tools Appendのwiki! (日本語)](https://github.com/MMD-Blender/blender_mmd_tools_append/wiki/Home.ja) を確認してください。
917

1018
### YouTube video available
1119
| [![How to use MMD Tools Append](https://img.youtube.com/vi/QJqfsohDzPs/0.jpg)](https://youtu.be/QJqfsohDzPs) |
1220
|:--:|
1321
| *How to use MMD Tools Append* / *MMD Tools Appendの使い方* |
1422

1523
## Contribution
16-
mmd_tools_append needs your contribution!
24+
MMD Tools Append needs your contribution!
1725

1826
- Feature/Asset requests (material, lighting, etc)
1927
- Document writing / translation
2028
- Asset creation (lighting, materials, accessories, etc)
2129
- Asset maintenance
2230
- Software development
2331

24-
If you are interested in any of the above, please contact me via the [issues](../../issues).
32+
If you are interested in supporting this project, please reach out via the following channels:
33+
- [MMD Tools Append Issues](https://github.com/MMD-Blender/blender_mmd_tools_append/issues)
34+
- [MMD & Blender Discord Server](https://discord.gg/zRgUkuaPWw)
35+
36+
For developers looking to contribute code or translations, please check the [Developer Guide](DEVELOPER_GUIDE.md) for project guidelines and detailed workflows.
2537

2638
## Credits
2739
- Rigid body Physics to Cloth Physics feature is the work of [小威廉伯爵](https://github.com/958261649/Miku_Miku_Rig). It was ported with his permission.
2840
- Lighting thumbnail images depict the character "Hatsune Miku" of Crypton Future Media, Inc. under the [Piapro Character License](http://piapro.jp/license/pcl/summary).
41+
42+
## License
43+
Distributed under the [GPLv3](LICENSE).

0 commit comments

Comments
 (0)