Skip to content

Linux native packaging. #144

Linux native packaging.

Linux native packaging. #144

name: Build and publish
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build-linux-appimage-rpm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fix tag reference (workaround for https://github.com/actions/checkout/issues/290)
run: git fetch --update-head-ok -f origin ${{ github.ref }}:${{ github.ref }}
- name: Build
run: docker compose up
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: executables-linux-appimage-rpm
if-no-files-found: error
path: |
target/appimage/*.AppImage
target/release/rpmbuild/RPMS/x86_64/*.rpm
build-linux-deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fix tag reference (workaround for https://github.com/actions/checkout/issues/290)
run: git fetch --update-head-ok -f origin ${{ github.ref }}:${{ github.ref }}
- name: Install system dependencies
run: |
sudo apt-get install -y pkg-config libgtk-4-dev libadwaita-1-dev libsasl2-2 libgtksourceview-5-0 openssl
cargo install cargo-deb
- name: Build
run: cargo deb
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: executables-linux-deb
if-no-files-found: error
path: |
target/debian/*.deb
build-windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fix tag reference (workaround for https://github.com/actions/checkout/issues/290)
run: git fetch --update-head-ok -f origin ${{ github.ref }}:${{ github.ref }}
- name: Build (Windows)
run: docker compose -f docker-compose.windows.yml up
- name: Make Windows Installer
run: ./build-scripts/create_windows_installer.sh
- name: Zip Portable Windows Artifact
run: zip -r windows-portable.zip package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: executables-windows
path: |
*.zip
*.exe
publish:
permissions:
contents: write
needs: [build-linux-appimage-rpm, build-linux-deb, build-windows]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: executables-*
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: false
draft: true
generate_release_notes: true
append_body: true
files: |
**/*.AppImage
**/*.zip
**/*.exe
**/*.deb
**/*.rpm
- run: ls -R .