-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (48 loc) · 1.46 KB
/
build-javascript.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build Javascript/Typescript
on:
push:
release:
types: [published]
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '21'
registry-url: 'https://npm.pkg.github.com'
- name: Build
run: bash build-javascript.sh
- name: Upload Javascript artifacts
uses: actions/upload-artifact@v2
with:
name: build-javascript
path: build/javascript/dist
- name: Upload Typescript artifacts
uses: actions/upload-artifact@v2
with:
name: build-typescript
path: build/javascript/src
- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: dist-javascript
path: build/javascript/*.tgz
- name: Prepare asset for upload
run: |
mv build/javascript/openagents-service-provider-proto-*.tgz build/javascript/openagents_service_provider_proto-JAVASCRIPT.tgz
- name: Upload release asset
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: build/javascript/openagents_service_provider_proto-JAVASCRIPT.tgz
- name: Publish
if: github.event_name == 'release'
run: cd build/javascript && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}