forked from workadventure/workadventure
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.52 KB
/
room-api-push-to-npm.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
name: Push @workadventure/room-api-client to NPM
on:
release:
types: [created]
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Replace version number
run: 'sed -i "s#VERSION_PLACEHOLDER#${{ github.ref_name }}#g" package.json'
working-directory: "libs/room-api-clients/room-api-client-js"
- name: Debug package.json
run: cat package.json
working-directory: "libs/room-api-clients/room-api-client-js"
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: '3.x'
- name: "Install play dependencies"
run: npm ci
working-directory: "libs/room-api-clients/room-api-client-js"
- name: "Build proto"
run: npm run ts-proto
working-directory: "libs/room-api-clients/room-api-client-js"
- name: "Build"
run: npm run build
working-directory: "libs/room-api-clients/room-api-client-js"
- name: Publish package
run: npm publish
working-directory: "libs/room-api-clients/room-api-client-js"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ github.event_name == 'release' }}