-
Notifications
You must be signed in to change notification settings - Fork 26
48 lines (40 loc) · 1.12 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
name: release
on:
push:
branches:
- master
paths-ignore:
- "**.json"
- "**.md"
workflow_dispatch:
jobs:
pre_run:
name: Cancel previous runs
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@ad6cb1b847ffb509a69b745b6ee2f1d14dfe14b8
with:
access_token: ${{ github.token }}
release:
name: Release
runs-on: ubuntu-latest
if: "github.event_name == 'push' && contains(github.event.head_commit.message, 'chore(release): publish')"
needs:
- pre_run
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SEMANTIC_RELEASE_PACKAGE: ${{ github.event.repository.name }}
with:
extra_plugins: |
@semantic-release/commit-analyzer
@semantic-release/changelog
@semantic-release/exec
@semantic-release/git