Repository navigation
100 lines (88 loc) · 3.16 KB
/
Copy pathpackage.yml
File metadata and controls
100 lines (88 loc) · 3.16 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Package
on:
push:
branches:
- master
- dev-workflow
pull_request:
release:
types: [published]
permissions:
contents: write
packages: write
jobs:
metadata:
name: Get metadata
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Version
id: version
run: |
if ${{ startsWith(github.ref, 'refs/tags/') }}; then
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
else
echo "version=devel" >> "$GITHUB_OUTPUT"
fi
debian:
name: Build debian package
runs-on: ubuntu-24.04
needs: metadata
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install Nix
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4
- name: Build
run: nix develop --command build_deb_package
- name: Archive package
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: yeschief-${{ needs.metadata.outputs.version }}_deb
path: |
${{ github.workspace }}/out/deb_package/*.deb
${{ github.workspace }}/out/deb_package/*.deb.sha512
- name: Upload to release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: xresloader/upload-to-github-release@e6ac9c2ff1018fca4464bf2480155faeb66f9bdb # v1.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "${{ github.workspace }}/out/deb_package/*.deb;${{ github.workspace }}/out/deb_package/*.deb.sha512"
tags: true
rpm:
name: Build rpm package
runs-on: ubuntu-24.04
needs: metadata
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install Nix
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4
- name: Build
run: nix develop --command build_rpm_package
- name: Archive package
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: yeschief-${{ needs.metadata.outputs.version }}_rpm
path: |
${{ github.workspace }}/out/rpm_package/*.rpm
${{ github.workspace }}/out/rpm_package/*.rpm.sha512
- name: Upload to release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: xresloader/upload-to-github-release@e6ac9c2ff1018fca4464bf2480155faeb66f9bdb # v1.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "${{ github.workspace }}/out/rpm_package/*.rpm;${{ github.workspace }}/out/rpm_package/*.rpm.sha512"
tags: true
nix:
name: Build nix package
runs-on: ubuntu-24.04
needs: metadata
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install Nix
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4
- name: Build
run: nix build .