-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.74 KB
/
deb.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
name: Create debian package
on: [push, pull_request]
env:
pkg_version: 1.2-${{github.run_number}}
pkg_name: fcow_1.2-${{github.run_number}}_all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create package structure
run: |
mkdir ${{env.pkg_name}}
cd ${{env.pkg_name}}
mkdir -p DEBIAN usr/local/games usr/local/man/man6 usr/local/share/fcow
- name: Write control
run: |
cat <<EOT >> deb_control
Package: fcow
Version: ${{env.pkg_version}}
Architecture: all
Maintainer: Angel Ruiz Fernandez <[email protected]>
Installed-Size: 5000
Depends: fortune, cowsay, lolcat
Section: game
Priority: optional
Homepage: https://github.com/informaticapau/fcow
Description: A full colored cow will advice your future
EOT
- name: Copy stuff inside
run: |
cp deb_control ${{env.pkg_name}}/DEBIAN/control
cp src/* ${{env.pkg_name}}/usr/local/games/
chmod +x ${{env.pkg_name}}/usr/local/games/*
cp share/* ${{env.pkg_name}}/usr/local/share/fcow/
cp man/* ${{env.pkg_name}}/usr/local/man/man6/
- name: Create deb package
run: dpkg-deb -Zxz --build ${{env.pkg_name}}
- name: Upload deb as artifact
uses: actions/upload-artifact@v3
with:
name: ${{env.pkg_name}}.deb
path: ${{env.pkg_name}}.deb
- name: Install rsync
run: sudo apt-get install rsync
- name: Upload deb to repo
run: RSYNC_PASSWORD=${{secrets.RSYNC_REPO_PASS}} rsync -avz ${{env.pkg_name}}.deb rsync://[email protected]/debupload/pool/contrib/