-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (39 loc) · 1.27 KB
/
npm-publish.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
# This workflow will run tests using node and then publish a package to NPM when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: npm-publish
on:
release:
types: [published]
concurrency:
group: build-test-publish
jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://registry.npmjs.org/
scope: '@totalsoft'
- run: yarn -v
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build
# - name: Run tests
# run: yarn test
- name: Bump version
run: yarn run version
- name: Set npm authToken from env
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn config &&
yarn config set npmScopes.totalsoft.npmRegistryServer "https://registry.npmjs.org/" &&
yarn config set npmScopes.totalsoft.npmAlwaysAuth true &&
yarn config set npmScopes.totalsoft.npmAuthToken $NODE_AUTH_TOKEN
- run: yarn publish