-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (39 loc) · 1.16 KB
/
release-nixos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release Nix image
on:
push:
tags:
- nixos-stable
- nixos-testing
paths:
- 'nixos/**.nix'
- 'nixos-options/**.nix'
- flake.nix
- flake.lock
- .github/workflows/release-nixos.yml
permissions:
contents: write
discussions: write
jobs:
gh-release-packer:
runs-on: ubuntu-latest
name: Release nix image
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build production image
id: build-stable
if: github.ref == 'refs/tags/nixos-stable'
run: nix build .#nixosConfigurations.initial-contabo.config.formats.qcow
- name: Build testing image
id: build-testing
if: github.ref == 'refs/tags/nixos-testing'
run: nix build .#nixosConfigurations.initial.config.formats.qcow
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
token: "${{ secrets.GITHUB_TOKEN }}"
generate_release_notes: true
files: |
result/nixos.qcow2