-
-
Notifications
You must be signed in to change notification settings - Fork 212
45 lines (41 loc) · 1.49 KB
/
release-it.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
# #########################################################################
# Creates a new release using `workflow_dispatch` event trigger with `type`
# as input to describe the type of release to create
name: 'Release-it: Create a new release on demand'
on:
workflow_dispatch:
inputs:
type:
description: 'Type. Can be `patch` `minor` or `major`'
required: true
default: 'patch'
jobs:
release-it:
if: github.actor == 'robertsLando' || github.actor == 'chrisns' || github.actor == 'AlCalzone'
runs-on: [ubuntu-latest]
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout master
uses: actions/checkout@v3
with:
ref: 'master'
fetch-depth: 0 # fetch all commits history to create the changelog
token: ${{ secrets.BOT_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Make the release
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
git config user.email "[email protected]"
git config user.name "Z-Wave JS Bot"
git config user.password "${{secrets.BOT_TOKEN}}"
echo "GIT_USER=${{github.actor}}:${{secrets.BOT_TOKEN}}" >> $GITHUB_ENV
npx release-it ${{github.event.inputs.type}} --ci --verbose