-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (50 loc) · 1.3 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
52
53
54
55
56
57
name: Release a new version
on:
workflow_dispatch:
inputs:
version-bump:
description: 'Version Bump'
required: true
default: 'minor'
type: choice
options:
- patch
- minor
- major
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install
run: |
npm ci
- name: Configure git
run: |
# Configure git
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
- name: Bump version
id: version
run: |
npm version ${{ github.event.inputs.version-bump }}
echo "::set-output name=new-version::$(npm pkg get version)"
- name: Build
env:
NODE_ENV: production
run: |
npm run build
- name: Push
run: |
git push --follow-tags origin master
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
clean-exclude: |
p0weruser.dev.user.js