-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (31 loc) · 1.12 KB
/
ci.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
name: CI
on:
push:
branches:
- master
jobs:
build_packages:
name: Build Packages and Publish to GitHub NPM Registry
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://npm.pkg.github.com"
scope: "@infomaniak"
- name: Build Packages
run: |
yarn
yarn workspace @infomaniak/mattermost-client build
yarn workspace @infomaniak/mattermost-types build
yarn config set npmPublishRegistry https://npm.pkg.github.com
yarn config set 'npmRegistries["//npm.pkg.github.com"].npmAuthToken' "$NPM_TOKEN"
yarn config set 'npmRegistries["//npm.pkg.github.com"].npmAlwaysAuth' true
yarn config set npmScopes.infomaniak.npmPublishRegistry https://npm.pkg.github.com
yarn workspace @infomaniak/mattermost-client npm publish
yarn workspace @infomaniak/mattermost-types npm publish
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}