-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.34 KB
/
publish-npm.yml
File metadata and controls
55 lines (44 loc) · 1.34 KB
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
55
name: Publish Package to NPM
on:
push:
tags:
- "*"
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
# Checking out repository
- uses: actions/checkout@v3
# Setting .npmrc file up to publish to npm
- name: Setting things up 🔧
uses: actions/setup-node@v2
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
# User or organization
scope: '@dative-gpi'
- name: Install and Build 🔧
run: |
npm install
npm run lint
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Generate imports map
run: |
cd src/shared/foundation-shared-loader
python importsGenerator.py
- name: Build foundation-shared-loader
run: |
npm install -w @dative-gpi/foundation-shared-loader
npm run build -w @dative-gpi/foundation-shared-loader
# Publishing with tag name as version
- name: Publishing to npm 🚀
run: |
lerna publish ${{ github.ref_name }} --exact --no-git-tag-version --yes --no-private --force-publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}