forked from shadichy/blissos-busybox
-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (96 loc) · 3.05 KB
/
build-linux.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
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
101
102
103
104
105
106
107
108
109
110
111
name: Generate linux packages
on:
schedule:
- cron: "0 0 15 * *"
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Debian package
run: |
# Build docker image
docker buildx create --use --name devuan-dev --buildkitd-flags '--allow-insecure-entitlement security.insecure'
docker buildx build --builder devuan-dev -f debian/ceres.dockerfile -t devuan --allow security.insecure --output type=tar,dest=install.tar .
# Export it to install
mkdir install
sudo tar -C install -psxf install.tar
# Move content out
mv install/*.{deb,buildinfo,changes} ./
mv install/metadata.yml .
# Clean up
sudo rm -rf install install.tar
- name: Set Vars
id: vars
run: |
echo "arch=$(dpkg --print-architecture)" >>"$GITHUB_OUTPUT"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: |
metadata.yml
busybox_*_*.buildinfo
busybox_*_*.changes
busybox-aaropa_*_*.deb
busybox-aaropa-dbgsym_*_*.deb
release:
name: Release
needs: build
if: ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags/'))
runs-on: ubuntu-latest
steps:
- name: Download buildfiles
id: download-buildfiles
uses: actions/download-artifact@v4
with:
path: out
pattern: "*"
merge-multiple: true
- name: List Files
run: ls -R ${{ steps.download-buildfiles.outputs.download-path }}
- uses: "softprops/[email protected]"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
prerelease: false
files: |
${{ steps.download-buildfiles.outputs.download-path }}/*
monthly-release:
name: Monthly release
needs: build
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
steps:
- name: Download buildfiles
id: download-buildfiles
uses: actions/download-artifact@v4
with:
path: out
pattern: "*"
merge-multiple: true
- name: List Files
run: ls -R ${{ steps.download-buildfiles.outputs.download-path }}
- uses: "softprops/[email protected]"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
prerelease: false
tag_name: "r${{ github.run_number }}"
name: "Monthly release r${{ github.run_number }}"
files: |
${{ steps.download-buildfiles.outputs.download-path }}/*