-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.11 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
name: Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
node_version:
description: 'Node.js Version'
required: true
default: '14'
release_version:
description: 'Release Version'
required: true
jobs:
npm-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ github.event.inputs.node_version }}
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build # assuming you have a build script in your package.json
continue-on-error: true # allows the workflow to continue even if this step fails (there is a bug in OpenAI dep)
- name: Update package version
run: npm version ${{ github.event.inputs.release_version }} --no-git-tag-version
- name: Publish package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}