Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Release tag to build (e.g. v0.2.0)"
required: true
default: "v0.2.0"
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
archive: tar.gz
- os: macos-13 # Intel runner — native x86_64, no cross-compilation
target: x86_64-apple-darwin
archive: tar.gz
- os: macos-latest # Apple Silicon runner — native aarch64
target: aarch64-apple-darwin
archive: tar.gz
- os: windows-latest
target: x86_64-pc-windows-msvc
archive: zip
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# NOTE: No system SQLCipher/OpenSSL packages needed.
# Cargo.toml uses bundled-sqlcipher-vendored-openssl which compiles
# SQLCipher and OpenSSL entirely from source on every platform.
- name: Add NASM to PATH (Windows — required by vendored-openssl)
if: runner.os == 'Windows'
run: echo "C:\Program Files\NASM" >> $env:GITHUB_PATH
- name: Build release
run: cargo build --release --target ${{ matrix.target }}
- name: Package (Unix)
if: runner.os != 'Windows'
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../dotkeep-${{ matrix.target }}.tar.gz dotkeep
cd ../../..
- name: Package (Windows)
if: runner.os == 'Windows'
run: |
cd target/${{ matrix.target }}/release
Compress-Archive dotkeep.exe ../../../dotkeep-${{ matrix.target }}.zip
cd ../../..
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dotkeep-${{ matrix.target }}
path: dotkeep-${{ matrix.target }}.*
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}