forked from 33cn/plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.32 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
name: release
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false # <--- this
- uses: actions/setup-go@v2
with:
go-version-file: 'go.mod'
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
branch: master
extra_plugins: |
conventional-changelog/conventional-changelog-jshint
@semantic-release/exec@6
@semantic-release/changelog@6
@semantic-release/git@10
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Do something when a new release published
if: steps.semantic.outputs.new_release_published == 'true'
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}