-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.26 KB
/
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
34
35
36
37
38
39
40
41
42
##
## Release
##
## This workflows aims to prepare the package for release to GitHub Package Registry.
## This can only be triggered manually via GitHub CLI/web.
##
## The whole process must take at most 3 minutes.
##
name: 'Release & publish to NPM Registry'
on:
## Allow triggering this workflow manually via GitHub CLI/web
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 3
env:
CI: 'true'
NODE_ENV: 'development'
steps:
##########################################################################
######################### Prepare the environment ########################
##########################################################################
- name: 'Checkout the repository'
uses: actions/checkout@v3
- name: 'Use node20'
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'npm'
- run: 'npm ci --ignore-scripts'
##########################################################################
- name: 'Build the project'
run: 'npm run build'
- name: 'Publish the lib'
run: 'npm run release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}