-
Notifications
You must be signed in to change notification settings - Fork 35
33 lines (31 loc) · 987 Bytes
/
build.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
name: build
on:
push:
branches:
- master
jobs:
bump-version:
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
runs-on: [self-hosted, public, linux, x64]
steps:
- uses: actions/checkout@master
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: |
npm ci
- name: update docs and bump version
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git fetch --tags
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "latest tag: $latest_tag"
new_version=$(npm version patch --message "Chore(version): %s [skip-ci]")
echo "new tag: $new_version"
git push origin master
git push origin $new_version