-
Notifications
You must be signed in to change notification settings - Fork 95
40 lines (34 loc) · 1.18 KB
/
build-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
name: build-deb
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install opam dune debhelper devscripts
- name: Build packages
run: |
DEBFULLNAME="Jane Street" [email protected] dch -b --newversion "$(git describe --tags | sed 's/^v//')+deb$(grep VERSION_ID /etc/os-release | cut -d'"' -f2)" -D unstable 'Building latest upstream'
dpkg-buildpackage -us -uc -b -j$(nproc)
# Because actions/upload-artifact will refuse to upload relative paths...
mv ../*.deb .
- uses: actions/upload-artifact@v3
with:
name: Packages
path: '*.deb'
if-no-files-found: error
- name: Upload to GitHub releases
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.deb'
tag: ${{ github.ref }}
overwrite: true
file_glob: true