-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 1.17 KB
/
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
name: Publish to npm
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch complete history
run: git fetch --prune --unshallow
- name: Get latest tag
id: get_tag
run: echo ::set-output name=TAG::$(git describe --tags --abbrev=0)
- name: Update package.json version
run: |
sed -i "s/\"version\": \".*\"/\"version\": \"$GITHUB_REF_NAME\"/" projects/khiops-webcomponent/src/package.json
env:
GITHUB_REF_NAME: ${{ steps.get_tag.outputs.TAG }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build:webcomponents
- name: Publish to npm
run: npm publish
working-directory: dist/khiops-webcomponent
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}