Skip to content

Commit 2da70c5

Browse files
Integration with the JS package (#1140)
* Integration with the JS package - Trigger JS package re-generate once a new release created - Add link in docs to the other platforms' packages * Use GitHab's dispatches API to trigger unitsnet-js re-build * Fix typo UNITSNET_JS_WORKFLOW_TOKEN Co-authored-by: Andreas Gullberg Larsen <[email protected]>
1 parent 9778f8a commit 2da70c5

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: trigger-js-package-release # Trigger JS package re-generate and publish to NPM (https://github.com/haimkastner/unitsnet-js)
2+
3+
on: # Trigger re-generate JS units once a new relaese created
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
trigger:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Call re-run generate & publish job
12+
env:
13+
UNITSNET_JS_WORKFLOW_TOKEN: ${{ secrets.UNITSNET_JS_WORKFLOW_TOKEN }}
14+
run: |
15+
# Trigger dispatches event to rebuild unitsnet-js package
16+
curl --location --request POST 'https://api.github.com/repos/haimkastner/unitsnet-js/actions/workflows/nodejs.yml/dispatches' \
17+
--header 'Accept: application/vnd.github.everest-preview+json' \
18+
--header 'Content-Type: application/json' \
19+
--header "Authorization: Basic $UNITSNET_JS_WORKFLOW_TOKEN" \
20+
--data-raw '{"ref": "master" }'

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,3 +440,11 @@ https://www.saf.guide
440440
https://github.com/StructuralAnalysisFormat/StructuralAnalysisFormat-SDK
441441
442442
*- Dirk Schuermans, Software Engineer for [SCIA nv](https://www.scia.net)*
443+
444+
## Units.NET on other platforms
445+
446+
The powerful strong-typed unites based on Units.NET [unite definition](/Common/UnitDefinitions) is available on other platforms!
447+
448+
- JavaScript / TypeScript
449+
- Package on NPM registery https://www.npmjs.com/package/unitsnet-js
450+
- Generate units source-code https://github.com/haimkastner/unitsnet-js

0 commit comments

Comments
 (0)