use actions

This commit is contained in:
dries.k
2021-08-09 15:26:29 +02:00
parent 1520e4d9e7
commit e1e669d00e
4 changed files with 98 additions and 53 deletions

98
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,98 @@
name: build
on:
push:
tags:
- '*'
jobs:
build-win64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9.5'
- 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@v2
with:
name: gotify-tray-installer-win.exe
path: gotify-tray-installer-win.exe
build-ubuntu:
strategy:
matrix:
tag: [focal, groovy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9.5'
- name: Upgrade pip and enable wheel support
run: python -m pip install --upgrade pip setuptools wheel
- name: Build
run: |
make build
cp dist/gotify-tray_amd64.deb gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
path: gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
build-debian:
strategy:
matrix:
tag: [buster, bullseye]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9.5'
- name: Upgrade pip and enable wheel support
run: python -m pip install --upgrade pip setuptools wheel
- name: Build
run: |
make build
cp dist/gotify-tray_amd64.deb gotify-tray_amd64_debian_${{ matrix.tag }}.deb
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: gotify-tray_amd64_debian_${{ matrix.tag }}.deb
path: gotify-tray_amd64_debian_${{ matrix.tag }}.deb
release:
runs-on: ubuntu-latest
needs: [build-win64, build-ubuntu, build-debian]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
gotify-tray-installer-win.exe
gotify-tray_amd64_ubuntu_focal.deb
gotify-tray_amd64_ubuntu_groovy.deb
gotify-tray_amd64_debian_buster.deb
gotify-tray_amd64_debian_bullseye.deb

View File

@@ -1,50 +0,0 @@
jobs:
include:
- stage: deploy
name: "Python 3.9 on Windows"
if: tag IS NOT blank
os: windows
language: shell
before_install:
- choco install python --version=3.9.5
- choco install innosetup
- python -m pip install --upgrade pip
env: PATH=/c/Python39:/c/Python39/Scripts:$PATH
install:
- pip install -r requirements.txt
- pip install pyinstaller
script:
- pyinstaller gotify-tray.spec
- iscc gotify-tray.iss
- mv "inno-output\gotify-tray-installer.exe" "gotify-tray-installer-win.exe"
deploy:
provider: releases
edge: true
cleanup: false
api_key: $GITHUB_TOKEN
file: gotify-tray-installer-win.exe
on:
tags: true
- stage: deploy
name: "Python 3.9 on ubuntu focal"
if: tag IS NOT blank
os: linux
dist: focal
language: python
python: 3.9
before_install:
- pip install --upgrade pip
install:
- pip install -r requirements.txt
- pip install pyinstaller
script:
- make build
- cp dist/gotify-tray_amd64.deb gotify-tray_amd64_focal.deb
deploy:
provider: releases
edge: true
cleanup: false
api_key: $GITHUB_TOKEN
file: gotify-tray_amd64_focal.deb
on:
tags: true

View File

@@ -1,7 +1,5 @@
# Gotify Tray
[![Build Status](https://travis-ci.com/seird/gotify-tray.svg?token=NwPpjHLfYaQgjnfyARPa&branch=master)](https://travis-ci.com/seird/gotify-tray)
A tray notification application for receiving messages from a [Gotify server](https://github.com/gotify/server).

View File

@@ -8,4 +8,3 @@ try {Remove-Item "dist/gotify-tray/opengl32sw.dll"} catch {}
echo "Creating installer"
iscc gotify-tray.iss
Move-Item "inno-output\gotify-tray-installer.exe" "gotify-tray-installer-win.exe"