pferd/.github/workflows/package.yml

78 lines
1.8 KiB
YAML
Raw Normal View History

2020-10-06 12:03:16 +02:00
name: Package Application with Pyinstaller
on:
push:
branches:
- "*"
tags:
- "v*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
2020-10-30 17:02:56 +01:00
os: [ubuntu-latest, windows-latest, macos-latest]
2020-10-06 12:03:16 +02:00
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: "Install dependencies"
run: "pip install setuptools pyinstaller rich requests beautifulsoup4 -f --upgrade"
- name: "Install sync_url.py"
run: "pyinstaller sync_url.py -F"
2020-10-30 17:02:56 +01:00
- name: "Move artifact"
run: "mv dist/sync_url* dist/sync_url-${{ matrix.os }}"
2020-10-06 12:03:16 +02:00
- uses: actions/upload-artifact@v2
with:
name: "Pferd Sync URL"
path: "dist/sync_url*"
release:
name: Release
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Download artifacts"
uses: actions/download-artifact@v2
with:
name: "Pferd Sync URL"
- name: "look at folder structure"
run: "ls -lah"
2020-10-30 17:02:56 +01:00
- name: "Rename releases"
run: "mv sync_url-macos-latest sync_url_mac && mv sync_url-ubuntu-latest sync_url_linux && sync_url-windows-latest sync_url_windows.exe"
- name: "look at folder structure after rename"
run: "ls -lah"
2020-10-06 12:03:16 +02:00
- name: "Create release"
uses: softprops/action-gh-release@v1
- name: "Upload release artifacts"
uses: softprops/action-gh-release@v1
with:
2020-10-30 17:02:56 +01:00
body: "Download the correct sync_url for your platform and run it in the terminal or CMD. You might need to make it executable ob Linux/Mac with 'chmod +x <file>'"
2020-10-06 12:03:16 +02:00
files: |
2020-10-30 17:02:56 +01:00
sync_url_mac
sync_url_linux
sync_url_windows.exe