Skip to content

Commit c4288fd

Browse files
marwieclaude
andcommitted
Add publish workflow with test gate and update README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aa1787c commit c4288fd

File tree

2 files changed

+74
-9
lines changed

2 files changed

+74
-9
lines changed

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/package'
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: '8.0.x'
20+
21+
- name: Restore dependencies
22+
run: dotnet restore tests/Needle.Engine.TypescriptCodegen.Tests.csproj
23+
24+
- name: Build
25+
run: dotnet build tests/Needle.Engine.TypescriptCodegen.Tests.csproj --no-restore
26+
27+
- name: Run tests
28+
run: dotnet test tests/Needle.Engine.TypescriptCodegen.Tests.csproj --no-build --verbosity normal
29+
30+
publish:
31+
needs: test
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 5
34+
defaults:
35+
run:
36+
working-directory: package
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '22'
45+
46+
- name: Publish to npm
47+
id: publish
48+
run: npx --yes needle-publish-helper@stable publish "." --webhook "${{ secrets.WEBHOOK_URL }}" --registry "${{ secrets.PACKAGE_REGISTRY_URL }}" --access-token "${{ secrets.NPM_TOKEN }}" --create-tag release/ --llm-api-key "${{ secrets.LLM_API_KEY }}"

package/Readme.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1-
# Needle Engine - C# to Typescript
2-
This package adds support to convert existing C# components to starter typescript code. Note that it does not convert your complete C# logic to typescript but it produces files that can be used as starting point for converting a project to Needle Engine components.
3-
4-
## Contact ✒️
5-
<b>[🌵 needle — tools for unity](https://needle.tools)</b> •
6-
[@NeedleTools](https://twitter.com/NeedleTools)
7-
[@marcel_wiessler](https://twitter.com/marcel_wiessler)
8-
[@hybridherbst](https://twitter.com/hybridherbst)
9-
[Needle Discord](https://discord.needle.tools)
1+
# Needle Engine - C# to TypeScript
2+
3+
This package converts existing C# components to starter TypeScript code for use with Needle Engine. It does not fully convert C# logic to TypeScript but produces files that serve as a starting point for porting a project to Needle Engine components.
4+
5+
## Features
6+
- Converts C# classes, structs, and enums to TypeScript
7+
- Maps Unity types to Needle Engine equivalents
8+
- Generates fields, properties, and method stubs
9+
- Available as a Unity Editor context menu action
10+
11+
## Usage
12+
1. Install the package in your Unity project
13+
2. Right-click a C# script in the Project window
14+
3. Select the option to generate TypeScript
15+
16+
## Requirements
17+
- Unity 2021.3+
18+
- `com.needle.engine-exporter` 2.50.0-pre or later
19+
- `com.unity.code-analysis` 0.1.2-preview or later
20+
21+
## Contact
22+
[needle — tools for unity](https://needle.tools) |
23+
[@NeedleTools](https://twitter.com/NeedleTools) |
24+
[@marcel_wiessler](https://twitter.com/marcel_wiessler) |
25+
[@hybridherbst](https://twitter.com/hybridherbst) |
26+
[Needle Discord](https://discord.needle.tools)

0 commit comments

Comments
 (0)