-
Notifications
You must be signed in to change notification settings - Fork 20
50 lines (42 loc) · 1.39 KB
/
upgrade.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
name: Extension Upgrade
on:
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
upgrade:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout Branch
uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update manifest/package.json version
run: |
./scripts/version-check.sh
jq '.version = $ENV.VERSION' manifest.json > tmp && mv tmp manifest.json
jq '.version = $ENV.VERSION' package.json > tmp && mv tmp package.json
jq '.version = $ENV.VERSION | .packages."".version = $ENV.VERSION' package-lock.json > tmp && mv tmp package-lock.json
npm install
npx prettier --write manifest.json package.json package-lock.json
env:
VERSION: ${{ inputs.version }}
- name: Add and commit
uses: EndBug/add-and-commit@v9
with:
message: "Bumps Version to v${{ inputs.version }}"
tag: "v${{ inputs.version }}"
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
branch: ${{ github.ref }}