Migrate from circle ci to github actions #46
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Checkout code | |
uses: actions/checkout@v4 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install asdf CLI | |
uses: asdf-vm/actions/setup@v3 | |
- name: Add semver | |
run: asdf plugin add semver || true | |
- name: Install semver | |
run: asdf install | |
- name: Define versions to update | |
id: sdk-versions | |
run: ./scripts/versions-to-update.sh @optable-web-sdk v0.20.2 >> "$GITHUB_OUTPUT" | |
# Print output | |
- name: Print versions | |
run: | | |
echo "SDK versions: ${{ steps.sdk-versions.outputs.versions }}" | |
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: Versions to update | |
run: | | |
echo "Versions to update: ${{ matrix.sdk-version }}" |