mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-24 03:50:21 +00:00
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
name: pre-release
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
pre-release:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
host: x86_64-linux
|
|
target: x86_64-linux
|
|
- os: ubuntu-latest
|
|
host: x86_64-linux
|
|
target: aarch64-linux
|
|
- os: ubuntu-latest
|
|
host: x86_64-linux
|
|
target: x86_64-windows
|
|
- os: macos-13
|
|
host: x86_64-darwin
|
|
target: x86_64-darwin
|
|
- os: macos-14
|
|
host: aarch64-darwin
|
|
target: aarch64-darwin
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-24.05
|
|
enable_kvm: true
|
|
extra_nix_config: "experimental-features = nix-command flakes"
|
|
- name: Cache Nix store
|
|
uses: cachix/cachix-action@v15
|
|
with:
|
|
name: soywod
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
extraPullNames: nix-community
|
|
- name: Build release
|
|
run: |
|
|
nix build -L --expr "
|
|
(builtins.getFlake \"git+file://${PWD}?shallow=1&rev=$(git rev-parse HEAD)\")
|
|
.outputs.packages.${{ matrix.host }}.${{ matrix.target }}.overrideAttrs {
|
|
GIT_DESCRIBE = \"$(git describe --all --always --dirty)\";
|
|
}"
|
|
nix run -L .#${{ matrix.target }} -- --version
|
|
- name: Upload release artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "himalaya.${{ matrix.target }}"
|
|
path: |
|
|
result/bin/himalaya*
|
|
result/bin/share
|