-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.12 KB
/
publish.yaml
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
name: Publish NPM Package
on:
workflow_dispatch:
inputs:
channel:
required: true
type: choice
description: NPM tag to publish the package to
options:
- oldversion
- alpha
- beta
- latest
package:
required: true
type: choice
description: Package to publish
options:
- '@currents/cmd'
- '@currents/jest'
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Publish to NPM
run: |
git config user.name "Currents NPM Bot"
git config user.email "[email protected]"
npm run publish:npm --workspace ${{ github.event.inputs.package }} -- --tag ${{ github.event.inputs.channel }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}