test release #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |