-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.08 KB
/
versioning.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
name: Increment Version
on:
push:
branches:
- main
jobs:
increment-version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install NVM
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- name: Install and use Node.js from .nvmrc
run: |
nvm install
nvm use
shell: bash -i {0}
- name: Install dependencies
run: npm ci
shell: bash -i {0}
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions@github.com"
- name: Increment version
id: increment_version
run: |
NEW_VERSION=$(npm version patch -m "💪 Increase Version to %s")
echo "New version: $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
echo "name=NEW_VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
shell: bash -i {0}
- name: Push changes
run: |
git push