Linux native packaging. #166
Workflow file for this run
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: 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/generate-rpm/*.rpm | |
build-linux-deb: | |
runs-on: ubuntu-24.04 | |
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-dev libgtksourceview-5-dev openssl | |
cargo install cargo-deb | |
- name: Build | |
run: | | |
cargo deb --deb-version $(git describe) | |
- 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: | | |
windows-portable.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 . |