mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 11:23:40 +00:00
Cleanup for macOS
This commit is contained in:
70
modules/machines/aether/nixos-wsl/.github/workflows/main.yml
vendored
Normal file
70
modules/machines/aether/nixos-wsl/.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: 'Build NixOS WSL tarball'
|
||||
|
||||
on: [push, pull_request, release]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# Nix Flakes doesn't work on shallow clones
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v12
|
||||
with:
|
||||
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
|
||||
# Configure Nix to enable flakes
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
- name: Run checks
|
||||
run: |
|
||||
nix flake check
|
||||
|
||||
- name: Build tarball
|
||||
run: |
|
||||
nix build '.#nixosConfigurations.mysystem.config.system.build.tarball'
|
||||
|
||||
- name: Upload tarball
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: rootfs
|
||||
path: result/tarball/nixos-wsl-x86_64-linux.tar.gz
|
||||
|
||||
- name: Build installer
|
||||
run: |
|
||||
nix build '.#nixosConfigurations.mysystem.config.system.build.installer'
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
path: result/tarball/nixos-wsl-installer.tar.gz
|
||||
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: rootfs
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Attach to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
nixos-wsl-x86_64-linux.tar.gz
|
||||
nixos-wsl-installer.tar.gz
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Reference in New Issue
Block a user