forked from vimaec/vim-webgl-component
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.39 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
43
44
45
46
47
48
49
50
51
name: Manual release
on:
workflow_dispatch:
inputs:
release_type:
description: "Select the release type"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major
jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') }} # Prevents job execution
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Git user
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
- name: Authenticate to NPM
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.VIM_NPM_PUSH }}" > ~/.npmrc
- name: Install dependencies
run: npm install
- name: Release Patch
if: ${{ github.event.inputs.release_type == 'patch' }}
run: npm run release-patch
env:
NODE_AUTH_TOKEN: ${{ secrets.VIM_NPM_PUSH }}
- name: Release Minor
if: ${{ github.event.inputs.release_type == 'minor' }}
run: npm run release-minor
env:
NODE_AUTH_TOKEN: ${{ secrets.VIM_NPM_PUSH }}
- name: Release Major
if: ${{ github.event.inputs.release_type == 'major' }}
run: npm run release-major
env:
NODE_AUTH_TOKEN: ${{ secrets.VIM_NPM_PUSH }}