forked from 33cn/plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.81 KB
/
automake.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
# This is a basic workflow that is manually triggered
name: manually auto publish release
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'auto make'
# Default value if no value is explicitly provided
default: 'push'
# Input has to be provided for the workflow to run
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
automake:
name: automake
runs-on: ubuntu-latest
steps:
- name: Set up Golang env
uses: actions/setup-go@v2
with:
go-version: 1.17
id: go
- name: checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false # <--- this
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
id: semantic
with:
branch: master
extra_plugins: |
conventional-changelog/conventional-changelog-jshint
@google/semantic-release-replace-plugin
@semantic-release/exec
@semantic-release/changelog
@semantic-release/git
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 }}