-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 932 Bytes
/
javascript.yml
File metadata and controls
33 lines (33 loc) · 932 Bytes
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: Publish Package to npmjs
on:
push:
tags:
- 'javascript-[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Clear npm cache
run: npm cache clean --force
working-directory: ./javascript
- name: Install dependencies
run: npm install
working-directory: ./javascript
- name: Build project in javascript directory
run: npm run build
working-directory: ./javascript
- name: Publish package from javascript directory
run: npm publish
working-directory: ./javascript
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}