-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (34 loc) · 1.06 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
name: "release package"
on:
workflow_dispatch:
inputs:
options:
description: 'Additional release-it options'
required: false
default: ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
release:
name: Release package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Npm config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- run: npm ci
# the version/changelog must be already updated on main branch using "npm run release:prepare"
# or check prepare-release.yml workflow
- name: New version release
run: npm run release -- --ci --no-increment --no-git.commit ${{ github.event.inputs.options }}