Skip to content

Write permissions for release pipeline. #11

Write permissions for release pipeline.

Write permissions for release pipeline. #11

Workflow file for this run

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
- uses: mlugg/setup-zig@v2.0.1
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