-
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (35 loc) · 1.14 KB
/
release.yml
File metadata and controls
38 lines (35 loc) · 1.14 KB
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
name: npm bump
on:
workflow_dispatch:
inputs:
newversion:
description: 'npm version {major,minor,patch}'
required: true
env:
FORCE_COLOR: 1
jobs:
version_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
# fetch full history so things like auto-changelog work properly
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: package.json
check-latest: true
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: npm test
- run: git reset --hard && git clean -fd
- name: npm version && npm test
uses: bcomnes/npm-bump@v2
with:
git_email: bcomnes@gmail.com
git_username: ${{ github.actor }}
newversion: ${{ github.event.inputs.newversion }}
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm