-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.73 KB
/
main.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
name: Release
on:
push:
branches: [ "master" ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
- run: zig fmt --check src/*.zig
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
- run: |
export VERSION="$(cat build.zig.zon | grep -o -E '\b[0-9]+\.[0-9]+\.[0-9]+\b')"
sudo apt install libgtk-3-0 libgtk-3-dev
mkdir exe
zig build -Doptimize=ReleaseSmall
cp zig-out/bin/zigenity exe/zigenity-${VERSION}-x86_64
- name: Debian Package
run: |
sudo apt install dpkg debhelper fakeroot
export VERSION="$(cat build.zig.zon | grep -o -E '\b[0-9]+\.[0-9]+\.[0-9]+\b')"
mkdir -p debian/zigenity
cp -r packages/DEBIAN debian/zigenity/
sed -i "s/VERSION/${VERSION}/g" debian/zigenity/DEBIAN/control
mkdir -p debian/zigenity/usr/bin
cp zig-out/bin/zigenity debian/zigenity/usr/bin
dpkg-deb --build debian/zigenity/
- name: Release
run: |
export VERSION="$(cat build.zig.zon | grep -o -E '\b[0-9]+\.[0-9]+\.[0-9]+\b')"
gh release create $VERSION --latest -F "changelog/${VERSION}.md" ./exe/* debian/zigenity.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#uses: softprops/action-gh-release@v2
#env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#with:
# tag_name: ${{ env.Version }}
# generate_release_notes: true
# files: |
# zig-out/bin/zigenity