-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 939 Bytes
/
release.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
name: Release & Publish to NPM
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Configure Git User
run: |
git config --global user.name "Mustapha GHLISSI"
git config --global user.email "ghlissi.mustapha@gmail.com"
- name: Configure NPM
run: npm config set //registry.npmjs.org/:_authToken $NPM_PUBLISH_TOKEN
env:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Build
run: npm run build
- name: Start release to NPM registry
run: npm run release --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: End of release to NPM registry
run: echo "Released successfully !"