This repository has been archived by the owner on Oct 27, 2024. It is now read-only.
Archival Notice #206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "action@github.com" | |
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 |