-
Notifications
You must be signed in to change notification settings - Fork 4
86 lines (74 loc) · 1.98 KB
/
publish.yml
File metadata and controls
86 lines (74 loc) · 1.98 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Publish
on:
workflow_dispatch:
inputs:
bump_type:
description: 'Bump type'
required: true
default: 'minor'
type: choice
options:
- patch
- minor
- major
- --no-increment
jobs:
bump:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Config Git
run: |
git config user.name ufrpe-devs
git config user.email ufrpedevs@gmail.com
- name: ReleaseIt
run: npm run release -- ${{inputs.bump_type}}
release:
name: Publish
runs-on: ubuntu-latest
needs: bump
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v2.4.3
with:
configuration: "./.github/workflows/changelog-config.json"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Read version
id: app_version
run: >-
echo "::set-output name=VERSION::$(
npm pkg get version |
sed 's/"//g'
)"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{steps.app_version.outputs.VERSION}}
name: v${{steps.app_version.outputs.VERSION}}
body: ${{steps.build_changelog.outputs.changelog}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}