Skip to content

Bump version 0.3.5 -> 0.3.6 with release-pipeline rework #3

Bump version 0.3.5 -> 0.3.6 with release-pipeline rework

Bump version 0.3.5 -> 0.3.6 with release-pipeline rework #3

Workflow file for this run

name: release-artifacts
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions:
contents: write # required to attach assets to GitHub Releases
jobs:
build-release-archive:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: svlens-linux-x86_64
- os: macos-latest # macos-latest is arm64 (M-series) since 2024
artifact: svlens-macos-arm64
runs-on: ${{ matrix.os }}
env:
ARTIFACT_NAME: ${{ matrix.artifact }}
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install Linux build prerequisites
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
git \
python3 \
ccache \
catch2 \
libyaml-cpp-dev \
zip
- name: Install macOS build prerequisites
if: runner.os == 'macOS'
run: |
brew update
brew install catch2 yaml-cpp fmt ccache || true
- name: Cache slang install
uses: actions/cache@v5
with:
path: ~/.local
key: ${{ runner.os }}-svlens-slang-${{ hashFiles('scripts/setup-deps.sh') }}
- name: Stage slang dependency
run: |
./scripts/setup-deps.sh --prefix "$HOME/.local"
- name: Configure and build release binary
run: |
PREFIX_PATH="$HOME/.local"
if [ "$RUNNER_OS" = "macOS" ]; then
PREFIX_PATH="$HOME/.local;/opt/homebrew"
JOBS=$(sysctl -n hw.ncpu)
else
JOBS=$(nproc)
fi
cmake -B build-release \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$PREFIX_PATH" \
-DSVLENS_FETCH_DEPS=OFF
cmake --build build-release -j"$JOBS"
- name: Smoke-run binary
run: |
./build-release/svlens --version
./build-release/svlens --help | head -20
- name: Package release archive
run: |
chmod +x scripts/package-release.sh
./scripts/package-release.sh build-release "$ARTIFACT_NAME" dist
- name: Compute SHA256
run: |
cd dist
shasum -a 256 "${ARTIFACT_NAME}.tar.gz" "${ARTIFACT_NAME}.zip" > "${ARTIFACT_NAME}.sha256"
cat "${ARTIFACT_NAME}.sha256"
- name: Upload workflow artifact
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.artifact }}
path: |
dist/${{ matrix.artifact }}.tar.gz
dist/${{ matrix.artifact }}.zip
dist/${{ matrix.artifact }}.sha256
- name: Attach to GitHub Release (tag push only)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v3
with:
files: |
dist/${{ matrix.artifact }}.tar.gz
dist/${{ matrix.artifact }}.zip
dist/${{ matrix.artifact }}.sha256
body_path: docs/releases/${{ github.ref_name }}.md
fail_on_unmatched_files: true