@platzio/sdk 0.6.0-beta.1 → 0.6.0-beta.1-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ name: 🚀 Publish SDK
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release:
10
+ name: 🚀 Publish SDK
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: 🛎️ Checkout
14
+ uses: actions/checkout@v3
15
+
16
+ - name: 🛠️ Setup node
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: latest
20
+
21
+ - name: 🎲 Choose backend version
22
+ id: backend_tag
23
+ run: |
24
+ if [ -f version-override.txt ]
25
+ then
26
+ echo "backend_tag=v`cat version-override.txt`" >> "$GITHUB_OUTPUT"
27
+ else
28
+ echo "backend_tag=v`cat package.json | jq -r .version`" >> "$GITHUB_OUTPUT"
29
+ fi
30
+
31
+ - name: ⬇️ Download OpenAPI schema
32
+ uses: robinraju/release-downloader@v1.8
33
+ with:
34
+ repository: ${{ github.repository_owner }}/backend
35
+ tag: ${{ steps.backend_tag.outputs.backend_tag }}
36
+ fileName: "openapi.yaml"
37
+
38
+ - name: 🏗️ Generate SDK
39
+ run: |
40
+ ./generate-sdk.sh openapi.yaml
41
+
42
+ - name: 👷 npm install
43
+ run: |
44
+ npm install
45
+
46
+ - name: 👷 npm build
47
+ run: |
48
+ npm run build
49
+
50
+ - name: 🚀 Publish to NPM
51
+ uses: JS-DevTools/npm-publish@v3
52
+ with:
53
+ token: ${{ secrets.NPM_TOKEN }}