-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.25 KB
/
Copy pathversion-bump.yaml
File metadata and controls
51 lines (43 loc) · 1.25 KB
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
name: Automated Version Bump
on:
workflow_dispatch:
inputs:
version:
description: 'Version to bump to'
type: choice
options:
- patch
- minor
- major
required: true
default: 'patch'
push:
branches:
- develop
env:
CI: true
ACCESS_TOKEN: ${{ secrets.DES_ACCESS_TOKEN }}
jobs:
version-bump:
runs-on: ubuntu-latest
steps:
- name: 📨 Checkout
uses: actions/checkout@v4
- name: ⚙️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: 🔧 Create .npmrc
run: echo "//npm.pkg.github.com/:_authToken=$ACCESS_TOKEN" >> ~/.npmrc
- name: ➕ Install dependencies
run: npm ci
- name: 🔺 Bump the package version
run: npm version ${{ inputs.version || 'patch' }} --no-git-tag-version
- name: 📝 Commit & Push
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "chore(version): bump to v$(jq '.version' package.json -r)"
git push --no-verify