chore(git): add android cargo build #63
This file contains hidden or 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: Build libsql android library | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Set up Docker Buildx (for multi-platform builds) | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # Build and push Docker image | |
| - name: Build Docker image | |
| run: | | |
| docker build -t libsql:build . | |
| docker save libsql:build -o libsql-image.tar | |
| - name: Upload Docker image as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libsql-docker-image | |
| path: libsql-image.tar | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name == 'workflow_dispatch' | |
| steps: | |
| - name: Download Docker image artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libsql-docker-image | |
| path: . | |
| - name: Load Docker image | |
| run: docker load -i libsql-image.tar |