From e1e669d00edce5ba11633dc1f203f9c5a3fcefe7 Mon Sep 17 00:00:00 2001 From: "dries.k" Date: Mon, 9 Aug 2021 15:26:29 +0200 Subject: [PATCH] use actions --- .github/workflows/build.yml | 98 +++++++++++++++++++++++++++++++++++++ .travis.yml | 50 ------------------- README.md | 2 - build-win.ps1 | 1 - 4 files changed, 98 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b70fa4e --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 09c9140..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 4e9cd34..09861ce 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/build-win.ps1 b/build-win.ps1 index c5f5cdf..ee3cd1e 100644 --- a/build-win.ps1 +++ b/build-win.ps1 @@ -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"