-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (30 loc) · 946 Bytes
/
release_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
name: Release Gensplore Component
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install jq
run: sudo apt-get install jq
- name: Update package version and release
run: |
cd gensplore-component
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "Current tag is $TAG_NAME"
jq ".version = \"$TAG_NAME\"" package.json > package.json.tmp && mv package.json.tmp package.json
yarn install
yarn build
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_OPTIONS: --max-old-space-size=4096