Skip to content

Migrate from circle ci to github actions #42

Migrate from circle ci to github actions

Migrate from circle ci to github actions #42

Workflow file for this run

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 }}"