nix #35
This file contains 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
name: nix | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
nix: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 # NOTE (aseipp): keep in-sync with the build.yml timeout limit | |
name: flake build | |
steps: | |
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b | |
with: | |
fetch-depth: 0 | |
- uses: DeterminateSystems/nix-installer-action@8cdf194da984e4f12b2f8c36d1fa107c1dd67f5c | |
- uses: DeterminateSystems/magic-nix-cache-action@87e8236f46702ab0ce5a058b605a173ec88d618e | |
- run: nix build .#static | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jj_tui_linux | |
path: | | |
result/bin/jj_tui | |
nix2: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 # NOTE (aseipp): keep in-sync with the build.yml timeout limit | |
name: flake build macos | |
steps: | |
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b | |
with: | |
fetch-depth: 0 | |
- uses: DeterminateSystems/nix-installer-action@8cdf194da984e4f12b2f8c36d1fa107c1dd67f5c | |
- uses: DeterminateSystems/magic-nix-cache-action@87e8236f46702ab0ce5a058b605a173ec88d618e | |
- run: nix build | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jj_tui_macos | |
path: | | |
result/bin/jj_tui | |
release: | |
runs-on: ubuntu-latest | |
name: release if tag | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4.1.7 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
jj_tui_macos | |
jj_tui_linux | |