Skip to content

Commit 9e13bd5

Browse files
committed
Add release workflow
1 parent 3ec4d78 commit 9e13bd5

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-images:
10+
name: Build ${{ matrix.image }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
image:
16+
- qcow2
17+
- ami
18+
- gce
19+
- azure
20+
- do
21+
- linode
22+
- oracle
23+
- vmware
24+
- proxmox
25+
- hyperv
26+
- lxc
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: DeterminateSystems/nix-installer-action@main
30+
- uses: cachix/cachix-action@v15
31+
with:
32+
name: polkanix
33+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
34+
35+
- name: Build ${{ matrix.image }}
36+
run: nix build -L '.#${{ matrix.image }}'
37+
38+
- name: Compress image
39+
run: |
40+
cd result
41+
tar -czf ../${{ matrix.image }}.tar.gz *
42+
cd ..
43+
44+
- name: Upload to release
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
files: ${{ matrix.image }}.tar.gz
48+
tag_name: ${{ github.ref_name }}
49+
draft: false
50+
prerelease: false

0 commit comments

Comments
 (0)