-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (52 loc) · 2.42 KB
/
2_bump_versions.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
54
55
56
57
58
59
60
61
62
63
64
65
name: 2. Bump versions
run-name: 2. Bump versions - CLI ${{ inputs.version }} from ${{ inputs.npm_channel }}
on:
workflow_dispatch:
inputs:
npm_channel:
description: 'Prisma CLI NPM Channel'
required: true
version:
description: 'New Prisma CLI version in that channel'
required: true
env:
ENVIRONMENT: production
jobs:
bump:
runs-on: ubuntu-latest
timeout-minutes: 7
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm install && npm run install:vscode
- name: Setup Git
run: |
sh scripts/set_git_credentials.sh
- name: Update versions in scripts folder
run: |
echo "${{ github.event.inputs.version }}" >scripts/versions/prisma_${{ github.event.inputs.npm_channel }}
- name: Update next extension version in scripts folder and output for later use
id: update # Used to access the calculated next extension version in later steps
run: node scripts/bump_extension_version.js ${{ github.event.inputs.npm_channel }}
- name: Commit and Push
run: |
sh scripts/commit_and_push.sh "bump Prisma CLI ${{ github.event.inputs.npm_channel }} version to ${{ github.event.inputs.version }} and extension version to ${{ steps.update.outputs.next_extension_version }} in scripts."
- name: Update Prisma CLI version and VSCode extension version
run: |
node scripts/update_package_json_files.js ${{ github.event.inputs.npm_channel }} ${{ steps.update.outputs.next_extension_version }} ${{ github.event.inputs.version }}
- name: Install Dependencies to update lock file
run: npm install && npm run install:vscode
- name: Push to branch
run: |
sh scripts/commit_and_push.sh "bump extension version to ${{ steps.update.outputs.next_extension_version }} in package.json" main
- name: Trigger next workflow for Language Server tests
uses: benc-uk/workflow-dispatch@v1
with:
workflow: 3. Test Language Server and publish
inputs: '{ "npm_channel": "${{ github.event.inputs.npm_channel }}", "extension_version": "${{ steps.update.outputs.next_extension_version }}", "trigger_reason": "Prisma CLI version ${{github.event.inputs.version}}" }'