Skip to content

Commit

Permalink
setup github actions to publish ts runtime to jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
timbod7 committed Nov 22, 2024
1 parent e724ada commit 76d3d08
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/publish-ts-runtime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

name: Publish

on:
push:
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.
steps:
- uses: actions/checkout@v4
- run: npx jsr publish
7 changes: 7 additions & 0 deletions typescript/runtime/embedded/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export function scopedNamesEqual(sn1: AST.ScopedName, sn2: AST.ScopedName): bool
return sn1.moduleName === sn2.moduleName && sn1.name === sn2.name;
}

export function scopedName(
moduleName: string,
name: string,
): AST.ScopedName {
return { moduleName, name };
}

function typeExprToStringImpl(te: AST.TypeExpr, withScopedNames: boolean) : string {
let result = "";
if (te.typeRef.kind == "primitive") {
Expand Down
2 changes: 1 addition & 1 deletion typescript/runtime/published/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adllang/adl-runtime",
"version": "0.0.2",
"version": "0.1.0",
"license": "BSD",
"exports": "./src/mod.ts",
"imports": {
Expand Down
7 changes: 7 additions & 0 deletions typescript/runtime/published/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export function scopedNamesEqual(sn1: AST.ScopedName, sn2: AST.ScopedName): bool
return sn1.moduleName === sn2.moduleName && sn1.name === sn2.name;
}

export function scopedName(
moduleName: string,
name: string,
): AST.ScopedName {
return { moduleName, name };
}

function typeExprToStringImpl(te: AST.TypeExpr, withScopedNames: boolean) : string {
let result = "";
if (te.typeRef.kind == "primitive") {
Expand Down

0 comments on commit 76d3d08

Please sign in to comment.