-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (44 loc) · 1.32 KB
/
npm-bump-version.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
47
48
49
50
51
52
53
name: NPM bump version
on:
workflow_dispatch:
inputs:
version:
description: 'Semver type of new version (major / minor / patch)'
required: true
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PEM }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Setup environment
uses: actions/setup-node@v4.1.0
with:
node-version: '18'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build package
run: yarn build
- name: Run tests
run: yarn test
- name: Setup Git
run: |
git config user.name 'grafana-delivery-bot[bot]'
git config user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
- name: bump version
run: npm version ${{ github.event.inputs.version }}
- name: Push latest version
run: git push origin main --follow-tags