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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
|
name: Packaging
on: [push, pull_request]
jobs:
debian:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install python3-build
sudo apt build-dep .
- name: Build Debian package
run: |
python3 -m build --sdist --no-isolation
mk-origtargz dist/nicotine-plus-*.tar.gz
debuild -sa -us -uc
- name: Prepare artifacts
run: |
mkdir build/package/
cp -Lr ../nicotine_* build/package/
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: debian-package
path: build/package/
flatpak:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
include:
- arch: x86_64
platform: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-47
options: --privileged
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Flatpak package
uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
with:
bundle: org.nicotine_plus.Nicotine-${{ matrix.arch }}.flatpak
manifest-path: build-aux/flatpak/org.nicotine_plus.Nicotine.json
cache-key: flatpak-builder-${{ github.sha }}
arch: ${{ matrix.arch }}
upload-artifact: false
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: flatpak-${{ matrix.arch }}-package
path: org.nicotine_plus.Nicotine-${{ matrix.arch }}.flatpak
snap:
timeout-minutes: 15
strategy:
matrix:
include:
- arch: x86_64
platform: ubuntu-latest
- arch: arm64
platform: ubuntu-24.04-arm
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Snap package
uses: snapcore/action-build@v1
id: build-snap
- name: Install Snap package
run: sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }}
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: snap-${{ matrix.arch }}-package
path: ${{ steps.build-snap.outputs.snap }}
windows:
runs-on: windows-latest
timeout-minutes: 15
strategy:
matrix:
include:
- arch: x86_64
prefix: mingw-w64-x86_64
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
release: false
update: true
install: >-
${{ matrix.prefix }}-ca-certificates
${{ matrix.prefix }}-gettext-tools
${{ matrix.prefix }}-gtk4
${{ matrix.prefix }}-libadwaita
${{ matrix.prefix }}-python-build
${{ matrix.prefix }}-python-cx-freeze
${{ matrix.prefix }}-python-gobject
${{ matrix.prefix }}-python-pycodestyle
${{ matrix.prefix }}-python-pylint
${{ matrix.prefix }}-python-setuptools
${{ matrix.prefix }}-python-wheel
${{ matrix.prefix }}-webp-pixbuf-loader
- name: Install additional dependencies
run: python3 packaging/windows/dependencies.py
- name: Freeze application
run: python3 packaging/windows/setup.py bdist_msi
- name: Archive installer artifacts
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.arch }}-installer
path: packaging/windows/build/*.msi
- name: Archive package artifacts
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.arch }}-package
path: packaging/windows/build/package
macos:
strategy:
matrix:
include:
- arch: x86_64
platform: macos-13
- arch: arm64
platform: macos-14
runs-on: ${{ matrix.platform }}
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set system language
run: defaults write NSGlobalDomain AppleLanguages "(en-US)"
- name: Create Python virtual environment
run: |
brew uninstall --ignore-dependencies python@3.12
brew install --overwrite python@3.12
python3.12 -m venv venv
- name: Install build dependencies
run: venv/bin/python3 packaging/macos/dependencies.py
- name: Freeze application
run: venv/bin/python3 packaging/macos/setup.py bdist_dmg
- name: Archive installer artifacts
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.arch }}-installer
path: packaging/macos/build/*.dmg
|