-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.51 KB
/
CreateTag.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
# This is a basic workflow that is manually triggered
name: Create Tag
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
type:
# Friendly description to be shown in the UI instead of 'name'
description: 'patch, minor, major, etc.'
# 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:
# This workflow contains a single job called "greet"
bump-version:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.x
- name: Bump npm version
run: |
git config --local user.name "GitHub Action"
git config --local user.email "[email protected]"
npm version ${{ github.event.inputs.type }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}