-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.38 KB
/
pull-request.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
name: Format, lint, test and build
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
workflow_dispatch:
jobs:
tests-prettier:
uses: ./.github/workflows/reusable-lint-test.yml
build:
needs: [tests-prettier]
uses: ./.github/workflows/reusable-build.yml
define-gcs-versions-to-update:
runs-on: ubuntu-latest
outputs:
sdk-versions: ${{ steps.sdk-versions.outputs.versions }}
steps:
- name: Find latest version
id: latest-versions
run: |
latestVersion=$(npm view @optable/web-sdk version)
echo "latestVersion=${latestVersion}" >> "$GITHUB_OUTPUT"
- name: Define versions to update
id: sdk-versions
run: ./scripts/versions-to-update.sh @optable-web-sdk 0.20.2 >> "$GITHUB_OUTPUT"
deploy-sdk-to-gcs:
needs: [define-gcs-versions-to-update]
strategy:
matrix:
sdk-version: ${{ fromJSON(needs.define-gcs-versions-to-update.outputs.sdk-versions) }}
runs-on: ubuntu-latest
env:
gcp-project-id: 118585658141
service-account: gh-ci-optable-web-sdk
steps:
- name: Download web artifacts
uses: actions/download-artifact@v4
with:
name: dist-web
path: browser/dist
- name: Versions to update
run: |
echo "Versions to update: ${{ matrix.sdk-version }}"