Use full clone in GitHub Actions #17
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
on: | |
push: | |
branches: [main] | |
tags: | |
- "v*" | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-linux | |
- os: macos-latest | |
target: x86_64-macos | |
- os: macos-latest | |
target: aarch64-macos | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: mlugg/[email protected] | |
with: | |
version: 0.14.0 | |
- name: Install dependencies (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y sqlite3 libsqlite3-dev libgit2-dev | |
- name: Install dependencies (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install sqlite libgit2 | |
- run: zig build | |
- run: zig build test | |
- run: zig build release | |
- name: Release | |
if: github.ref_type == 'tag' | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
generate_release_notes: true | |
files: | | |
zig-out/git-remote-sqlite-${{ matrix.target }}.tar.gz | |
zig-out/git-remote-sqlite.db |