Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bug report
description: Report a reproducible problem with a 4FusionLab add-in
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: "Describe the problem without attaching private CAD data, tokens or credentials."
- type: input
id: fusion
attributes:
label: Autodesk Fusion version
placeholder: "e.g. 2.xxxx"
validations:
required: false
- type: dropdown
id: platform
attributes:
label: Operating system
options:
- macOS
- Windows
- Other / unknown
validations:
required: true
- type: textarea
id: steps
attributes:
label: Reproduction steps
description: Include expected and observed behaviour
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant logs or screenshots (redact sensitive information)
validations:
required: false
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Feature request
description: Suggest a change to an add-in or a new user workflow
title: "[Feature] "
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: User problem
description: Explain what you cannot do in Fusion today
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Desired behaviour
description: Include an example modelling scenario and expected outcome
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives and constraints
validations:
required: false
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Summary

Describe the user-facing value and why this change is needed.

## Scope and verification

- [ ] Project-specific `AGENTS.md` and relevant docs were checked
- [ ] Relevant unit/integration tests passed (include commands and results)
- [ ] Impact on native Fusion behaviour and OS compatibility is described
- [ ] Existing Fusion manifest IDs and backward compatibility are preserved
- [ ] No credentials, generated build files or user CAD data added

## Release impact

- [ ] Runtime/packaging inputs changed → an automatic release is expected after CI passes on `main`
- [ ] Documentation/tests/CI only → no GitHub Release should be created
- [ ] `.github/release-paths.txt` was updated if shipped-runtime scope changed

## User documentation

- [ ] Existing EN and RU guides were updated where relevant, or not applicable

> Never manually create a tag or GitHub Release for a normal `main` push/merge. This template is a checklist, not an instruction to bypass existing review, platform validation or native-CAD acceptance.
37 changes: 37 additions & 0 deletions .github/actions/release-notes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "4FusionLab release notes"
description: "Reuse reviewed version notes or generate readable notes from Git history"
inputs:
product:
description: "Product name for release heading"
required: true
version:
description: "Calculated numeric GitVersion value"
required: true
candidate:
description: "Optional repository-relative version-specific reviewed notes file"
required: false
default: ""
output:
description: "Writable path for generated notes; use a path in runner.temp"
required: true
outputs:
notes-file:
description: "Path to the complete release notes"
value: ${{ steps.notes.outputs.notes_file }}
runs:
using: composite
steps:
- name: Prepare release notes
shell: bash
id: notes
env:
RELEASE_PRODUCT: ${{ inputs.product }}
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_CANDIDATE: ${{ inputs.candidate }}
RELEASE_OUTPUT: ${{ inputs.output }}
run: |
set -euo pipefail
python3 "${{ github.action_path }}/notes.py" \
--product "$RELEASE_PRODUCT" --version "$RELEASE_VERSION" \
--candidate "$RELEASE_CANDIDATE" --output "$RELEASE_OUTPUT"
echo "notes_file=$RELEASE_OUTPUT" >> "$GITHUB_OUTPUT"
46 changes: 46 additions & 0 deletions .github/actions/release-notes/notes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""Select reviewed notes or generate fallback release notes from Git history."""
import argparse
import re
import subprocess
from pathlib import Path


def git(*args):
return subprocess.run(["git", *args], capture_output=True, text=True, check=False)


def create_notes(product, version, candidate, output):
if not re.fullmatch(r"\d+\.\d+\.\d+", version):
raise ValueError("Fusion release version must be MAJOR.MINOR.PATCH")
output = Path(output)
if candidate:
reviewed = Path(candidate)
if reviewed.is_file() and reviewed.read_text(encoding="utf-8").strip():
output.write_text(reviewed.read_text(encoding="utf-8"), encoding="utf-8")
return "reviewed"
previous = git("describe", "--tags", "--abbrev=0", "--match", "v[0-9]*", "HEAD")
tag = previous.stdout.strip() if previous.returncode == 0 else None
rev = f"{tag}..HEAD" if tag else "HEAD"
logs = subprocess.run(["git", "log", "--max-count=100", "--format=- %s (%h)", rev],
check=True, capture_output=True, text=True).stdout.strip()
if not logs:
raise ValueError("No commits since previous release; cannot generate notes.")
previous_label = f"Changes since {tag}" if tag else "Initial release changes"
output.write_text(f"# {product} v{version}\n\n{previous_label}:\n\n{logs}\n",
encoding="utf-8")
return "generated"


def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--product", required=True)
parser.add_argument("--version", required=True)
parser.add_argument("--output", required=True)
parser.add_argument("--candidate", default="")
args = parser.parse_args()
method = create_notes(args.product, args.version, args.candidate, args.output)
print(f"Prepared {method} notes: {args.output}")


if __name__ == "__main__":
main()
34 changes: 34 additions & 0 deletions .github/actions/resolve-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "4FusionLab GitVersion 6.8.2"
description: "Resolve a numeric Fusion package version or full SemVer without publishing"
inputs:
variable:
description: "GitVersion variable: MajorMinorPatch or SemVer"
required: false
default: "MajorMinorPatch"
outputs:
version:
description: "Resolved GitVersion value"
value: ${{ steps.version.outputs.version }}
runs:
using: composite
steps:
- id: version
name: Calculate GitVersion
shell: bash
env:
GITVERSION_VARIABLE: ${{ inputs.variable }}
run: |
set -euo pipefail
case "$GITVERSION_VARIABLE" in
MajorMinorPatch|SemVer) ;;
*) echo "Unsupported GitVersion variable: $GITVERSION_VARIABLE" >&2; exit 2 ;;
esac
dotnet tool install GitVersion.Tool --tool-path "$RUNNER_TEMP/gitversion" --version 6.8.2
version="$("$RUNNER_TEMP/gitversion/dotnet-gitversion" /showvariable "$GITVERSION_VARIABLE")"
if [[ "$GITVERSION_VARIABLE" == MajorMinorPatch ]]; then
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit 1
else
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]] || exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "### GitVersion ($GITVERSION_VARIABLE): $version" >> "$GITHUB_STEP_SUMMARY"
37 changes: 37 additions & 0 deletions .github/actions/runtime-changes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "4FusionLab runtime change detection"
description: "Compare the entire push range to the repository's auditable release-paths allowlist"
inputs:
before:
description: "Previous commit in push event (github.event.before)"
required: true
after:
description: "New commit in push event (github.sha)"
required: true
paths-file:
description: "Repository-relative runtime allowlist"
required: false
default: ".github/release-paths.txt"
outputs:
release:
description: "true iff runtime-affecting file was added/modified/deleted/renamed"
value: ${{ steps.changes.outputs.release }}
matched-count:
description: "Number of matched runtime paths"
value: ${{ steps.changes.outputs.matched_count }}
runs:
using: composite
steps:
- name: Detect eligible runtime changes
id: changes
shell: bash
env:
RELEASE_BEFORE: ${{ inputs.before }}
RELEASE_AFTER: ${{ inputs.after }}
RELEASE_PATHS_FILE: ${{ inputs.paths-file }}
run: |
set -euo pipefail
python3 "${{ github.action_path }}/detect.py" \
--config "$GITHUB_WORKSPACE/$RELEASE_PATHS_FILE" \
--before "$RELEASE_BEFORE" \
--after "$RELEASE_AFTER" \
--github-output "$GITHUB_OUTPUT"
64 changes: 64 additions & 0 deletions .github/actions/runtime-changes/detect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""Determine release eligibility from Git changes and a repository-specific allowlist."""
import argparse
import fnmatch
import subprocess
from pathlib import Path


def read_rules(path):
lines = Path(path).read_text(encoding="utf-8").splitlines()
rules = [line.strip() for line in lines if line.strip() and not line.lstrip().startswith("#")]
if not any(not line.startswith("!") for line in rules):
raise ValueError("Release paths must contain at least one positive pattern.")
return rules


def impacted(files, rules):
include = [pattern for pattern in rules if not pattern.startswith("!")]
exclude = [pattern[1:] for pattern in rules if pattern.startswith("!")]
return [path for path in files
if any(fnmatch.fnmatchcase(path, pattern) for pattern in include)
and not any(fnmatch.fnmatchcase(path, pattern) for pattern in exclude)]


def git_paths(before, after):
if not after:
raise ValueError("An after SHA is required.")
if not before or before == "0" * 40:
command = ["git", "ls-tree", "-rz", "--name-only", after]
else:
# --no-renames reports both old and new paths; deleted runtime files count too.
command = ["git", "diff", "--name-only", "-z", "--no-renames", before, after]
stdout = subprocess.check_output(command)
return [entry.decode("utf-8", errors="surrogateescape")
for entry in stdout.split(b"\0") if entry]


def evaluate(paths, rules):
changed = list(paths)
matches = impacted(changed, rules)
return len(matches) > 0, matches


def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--config", required=True)
parser.add_argument("--before")
parser.add_argument("--after")
parser.add_argument("--github-output")
parser.add_argument("--changed", nargs="*")
args = parser.parse_args()
rules = read_rules(args.config)
files = args.changed if args.changed is not None else git_paths(args.before, args.after)
eligible, matched = evaluate(files, rules)
value = "true" if eligible else "false"
print(f"Release eligible: {value} ({len(matched)} matching paths)")
for path in matched:
print(" " + path)
if args.github_output:
with open(args.github_output, "a", encoding="utf-8") as output:
output.write(f"release={value}\nmatched_count={len(matched)}\n")


if __name__ == "__main__":
main()
37 changes: 37 additions & 0 deletions .github/actions/verify-archive/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "4FusionLab ZIP integrity"
description: "Read-only validation of versioned release ZIPs, SHA-256 and Fusion manifests"
inputs:
product:
description: "Product prefix for archive filenames"
required: true
version:
description: "GitVersion MajorMinorPatch"
required: true
archives:
description: "Newline-separated ZIP paths relative to caller workspace"
required: true
manifest:
description: "Fusion manifest path inside ZIP, if this is a Fusion add-in"
required: false
default: ""
notes:
description: "Nonempty notes file path; omit for a nonpublishing dry-run"
required: false
default: ""
runs:
using: composite
steps:
- name: Validate release artifacts
shell: bash
env:
RELEASE_PRODUCT: ${{ inputs.product }}
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_ARCHIVES: ${{ inputs.archives }}
RELEASE_MANIFEST: ${{ inputs.manifest }}
RELEASE_NOTES: ${{ inputs.notes }}
run: |
set -euo pipefail
python3 "${{ github.action_path }}/verify.py" \
--product "$RELEASE_PRODUCT" --version "$RELEASE_VERSION" \
--archives "$RELEASE_ARCHIVES" \
--manifest "$RELEASE_MANIFEST" --notes "$RELEASE_NOTES"
Loading
Loading