-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (47 loc) · 1.75 KB
/
npmpublish.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
43
44
45
46
47
48
49
50
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish Node.js Package
on:
release:
types: [published]
workflow_dispatch:
inputs:
node_version:
description: 'Node version to use'
required: true
default: '20'
registry_url:
description: 'NPM registry URL'
required: true
default: 'https://registry.npmjs.org/'
scope:
description: 'Scope for npm package'
required: false
default: 'openimis'
access:
description: 'Access level for npm package'
required: false
default: 'public'
tab:
required: true
jobs:
call-npm-publish-workflow:
uses: openimis/openimis-fe_js/.github/workflows/module-npmpublish.yml@feature/central-publish-workflow
with:
registry_url: 'https://registry.npmjs.org/'
node_version: ${{ github.event.inputs.node_version:-'20' }}
access: ${{ github.event.inputs.access:-'public' }}
scope: ${{ github.event.inputs.scope:-'openimis' }}
tag: ${{ github.event.inputs.tag }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
call-gpr-publish-workflow:
uses: openimis/openimis-fe_js/.github/workflows/module-npmpublish.yml@feature/central-publish-workflow
with:
registry_url: 'https://npm.pkg.github.com/'
node_version: ${{ github.event.inputs.node_version:-'20' }}
access: ${{ github.event.inputs.access:-'public' }}
scope: ${{ github.event.inputs.scope:-'openimis' }}
tag: ${{ github.event.inputs.tag }}
secrets:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}