Skip to content

Commit ee851b8

Browse files
committed
2 parents ceac638 + 0e6db5d commit ee851b8

File tree

3 files changed

+43
-33
lines changed

3 files changed

+43
-33
lines changed

.github/workflows/patch.yml

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: patch
22

33
on:
4-
workflow_dispatch
5-
#schedule:
6-
# - cron: "0 13 * * 1"
4+
schedule:
5+
- cron: "0 13 * * 1"
6+
workflow_dispatch:
77

88
jobs:
99
setup-outputs:
@@ -14,7 +14,7 @@ jobs:
1414
commitCount: ${{ steps.step2.outputs.commitCount }}
1515

1616
steps:
17-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@v6
1818
with:
1919
fetch-depth: 0
2020
- id: step1
@@ -34,47 +34,49 @@ jobs:
3434

3535
runs-on: ubuntu-latest
3636

37-
#if: ${{needs.setup-outputs.outputs.commitCount >= 5}}
37+
if: ${{needs.setup-outputs.outputs.commitCount >= 5}}
3838
steps:
39-
- uses: actions/checkout@v5
39+
- uses: actions/checkout@v6
4040
with:
4141
fetch-depth: 0
4242
- id: step1
4343
run: echo "newTag=`echo $(echo ${{needs.setup-outputs.outputs.currentTag}} | awk 'BEGIN{FS=OFS="."} {$3+=1} 1')`" >> $GITHUB_ENV
44-
#- name: Edit csproj
45-
# run: sed -i 's+<VersionPrefix>${{needs.setup-outputs.outputs.currentTag}}</VersionPrefix>+<VersionPrefix>${{env.newTag}}</VersionPrefix>+g' ./CSharpToJavaScript.csproj
46-
#- uses: actions4git/setup-git@v1
47-
#- run: |
48-
# git commit -am "Nuget ${{env.newTag}}"
49-
# git push
44+
- name: Edit csproj
45+
run: sed -i 's+<VersionPrefix>${{needs.setup-outputs.outputs.currentTag}}</VersionPrefix>+<VersionPrefix>${{env.newTag}}</VersionPrefix>+g' ./CSharpToJavaScript.csproj
46+
- uses: actions4git/setup-git@v1
47+
- run: |
48+
git commit -am "Nuget ${{env.newTag}}"
49+
git push
5050
- run: git log ${{needs.setup-outputs.outputs.currentTag}}..master --format=format:'- [%s](https://github.com/TiLied/CSharpToJavaScript/commit/%H)%n' --output=./release.txt
51-
#- name: Create Release
52-
# id: create_release
53-
# uses: actions/create-release@v1
54-
# env:
55-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
56-
# with:
57-
# tag_name: ${{ env.newTag }}
58-
# release_name: ${{ env.newTag }}
59-
# body_path: ./release.txt
60-
# draft: false
61-
# prerelease: false
51+
- name: Create Release
52+
id: create_release
53+
uses: softprops/action-gh-release@v2
54+
with:
55+
tag_name: ${{ env.newTag }}
56+
body_path: ./release.txt
57+
draft: false
58+
prerelease: false
59+
generate_release_notes: true
6260
- name: Update .csproj
6361
#TODO? I don't know how to cat a file and paste...
6462
#- run: |
6563
# file=$(cat ./release.txt)
6664
# echo "releaseNotes=$file" >> $GITHUB_ENV
6765
run: sed -i 's+<PackageReleaseNotes></PackageReleaseNotes>+<PackageReleaseNotes>https://github.com/TiLied/CSharpToJavaScript/releases/tag/${{env.newTag}}</PackageReleaseNotes>+g' ./CSharpToJavaScript.csproj
68-
#- name: Setup .NET
69-
# uses: actions/setup-dotnet@v1
70-
# with:
71-
# dotnet-version: 10.0.x
72-
#- name: Generate NuGet package
73-
# run: dotnet pack --configuration Release --output packages
74-
#- name: Publish NuGet package
75-
# run: dotnet nuget push packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
66+
- name: Setup .NET
67+
uses: actions/setup-dotnet@v5
68+
with:
69+
dotnet-version: 10.0.x
70+
- name: Generate NuGet package
71+
run: dotnet pack --configuration Release --output ./packages
72+
- name: Publish NuGet package
73+
run: dotnet nuget push ./packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
7674
- run: cat ./CSharpToJavaScript.csproj
75+
- name: Upload artifact
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: CSharpToJavaScript-${{ env.newTag }}
79+
path: ./packages
7780
- name: Environments
7881
run: |
7982
echo $newTag
80-
echo $releaseNotes

CSharpToJavaScript.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>0.1.0</VersionPrefix>
4+
<VersionPrefix>0.1.1</VersionPrefix>
55

66
<TargetFramework>net10.0</TargetFramework>
77
<ImplicitUsings>disable</ImplicitUsings>

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
This library is a "core" where all the "magic" happens for translating/converting cs into js, using Roslyn. You should use the [CLI](https://github.com/TiLied/CSTOJS_CLI)/dotnet tool, it behaves more or less like dotnet cli, tsc cli, meson. Look for the implementation in [CLI](https://github.com/TiLied/CSTOJS_CLI), [BWA app](https://github.com/TiLied/CSTOJS_BWA) or simple "Hello world" below.
55

6+
## Status
7+
test262-parser([master](github.com/tc39/test262-parser-tests)): Only JS part (code is not public, yet. ES3 implemented) Total tests: 5363 | Passed: 2786 (51 %) | Failed: 2577
8+
9+
test262([es5 branch](https://github.com/tc39/test262/tree/es5-tests)): Total tests: 11725 | Passed: 4997 (42 %)** | Failed: 6728
10+
11+
**Note: Tests run with "UseVarOverLet" and "DisableCompilationErrors" options, using [Jint](github.com/sebastienros/jint) as an engine. The goal is to generate valid C# code and get rid of "DisableCompilationErrors" option.
12+
613
## Hello world
714
- Install [nuget package](https://www.nuget.org/packages/CSharpToJavaScript/) or download a [specific version](https://github.com/TiLied/CSharpToJavaScript/releases).
815
- Skip this if using a Nuget package. Follow [the instructions on how to add a project reference](https://learn.microsoft.com/en-us/dotnet/core/tutorials/library-with-visual-studio?pivots=dotnet-7-0#add-a-project-reference).
@@ -34,6 +41,7 @@ FileData file = new()
3441

3542
## Related Repository
3643
- Dotnet tool/CLI for a library: https://github.com/TiLied/CSTOJS_CLI
44+
- Tests: https://github.com/TiLied/CSTOJS_Tests
3745
- Library for generating various stuff: https://github.com/TiLied/CSTOJS_GenLib
3846
- Website/documentation: https://github.com/TiLied/CSTOJS_Pages
3947
- Blazor WebAssembly app: https://github.com/TiLied/CSTOJS_BWA

0 commit comments

Comments
 (0)