133 lines
3.9 KiB
YAML
133 lines
3.9 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
build-win64:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10.8'
|
|
- name: Upgrade pip and enable wheel support
|
|
run: python -m pip install --upgrade pip setuptools wheel
|
|
- name: Install Requirements
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
shell: bash
|
|
- name: Build
|
|
run: |
|
|
powershell -File build-win.ps1
|
|
mv inno-output\gotify-tray-installer.exe gotify-tray-installer-win.exe
|
|
shell: cmd
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: gotify-tray-installer-win.exe
|
|
path: gotify-tray-installer-win.exe
|
|
|
|
build-debian:
|
|
strategy:
|
|
matrix:
|
|
tag: [bullseye, bookworm]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10.8'
|
|
- name: Upgrade pip and enable wheel support
|
|
run: python -m pip install --upgrade pip setuptools wheel
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.0'
|
|
- name: Build
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
gem install fpm
|
|
chmod +x build-linux.sh
|
|
./build-linux.sh deb
|
|
mv "dist/gotify-tray_$(cat version.txt)_amd64.deb" "gotify-tray_$(cat version.txt)_amd64_${{ matrix.tag }}.deb"
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: gotify-tray_${{github.ref_name}}_amd64_${{ matrix.tag }}.deb
|
|
path: gotify-tray_${{github.ref_name}}_amd64_${{ matrix.tag }}.deb
|
|
|
|
build-macos:
|
|
runs-on: macos-12
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10.8'
|
|
- name: Upgrade pip and enable wheel support
|
|
run: python -m pip install --upgrade pip setuptools wheel
|
|
- name: Build
|
|
run: |
|
|
make build-macos
|
|
brew install create-dmg
|
|
create-dmg --volname "Gotify Tray" --app-drop-link 0 0 --no-internet-enable "gotify-tray.dmg" "./dist/Gotify Tray.app"
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: gotify-tray.dmg
|
|
path: gotify-tray.dmg
|
|
|
|
pypi:
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/p/gotify-tray
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10.8'
|
|
- name: Upgrade pip and enable wheel support
|
|
run: python -m pip install --upgrade pip setuptools wheel
|
|
- name: install requirements
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install build
|
|
- name: create pip package
|
|
run: python -m build
|
|
- name: upload to pypi
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
|
path: dist/gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-win64, build-debian, build-macos, pypi]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/download-artifact@v3
|
|
- name: Release
|
|
uses: marvinpinto/action-automatic-releases@latest
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
prerelease: false
|
|
files: |
|
|
gotify-tray-installer-win.exe
|
|
gotify-tray.dmg
|
|
gotify-tray_${{github.ref_name}}_amd64_bullseye.deb
|
|
gotify-tray_${{github.ref_name}}_amd64_bookworm.deb
|
|
gotify_tray-${{github.ref_name}}-py3-none-any.whl
|