Skip to content

Commit

Permalink
Typescript: Add typescript generation
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
WouterSpaak committed Mar 14, 2024
1 parent 3afa7e9 commit 23ab9fe
Show file tree
Hide file tree
Showing 11 changed files with 2,977 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/node_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: NPM Publish
on:
push:
tags:
- "*"

jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: "npm"
- name: Build and publish to NPM
working-directory: ./typescript
run: |
npm ci
npm run set-version --version="${{ github.ref_name }}"
npm run build
npm publish --public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var/
wheels/
pip-wheel-metadata/
share/python-wheels/
node_modules/
*.egg-info/
.installed.cfg
*.egg
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ A number of tools are available to create the Python package:
- `./python/ci/linux/update_dependencies.sh`: Updates the build and package dependencies.
- `./python/ci/linux/build_python_package.sh`: Generates the python package containing the python generated protobuf
messages.

# TypeScript-specific implementation Developers Guide
To build the TypeScript artifacts, navigate to `/typescript` and run `npm run build`. Versioning is done automatically
through the corresponding GitHub action (see [node_release.yml](./.github/workflows/node_release.yml)).
28 changes: 28 additions & 0 deletions typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# @omotes/proto

Library containing generated OMOTES Job class from Protobuf specification.

You probably don't want to install this directly, rather install it through [@omotes/sdk](https://npmjs.com/@omotes/sdk).

## Development

Make sure you have the `protoc` executable available on your PATH.
Version 25.2 is used: https://github.com/protocolbuffers/protobuf/releases.

### Building

Run the following command to build the protobuf artifacts:

```sh
npm run build
```

### Bumping version from tag

To correctly version `package.json` with the corresponding git tag, run:

```sh
npm run set-version major.minor.patch
```

You shouldn't have to run this yourself, it will be called through GitHub actions (see [node_release.yml](../.github/workflows/node_release.yml)).
Loading

0 comments on commit 23ab9fe

Please sign in to comment.