Merge pull request #2 from jhnnsrs:dev #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
permissions: write-all | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Build packages | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
TARGET: windows | |
CMD_BUILD: python build-windows.py | |
OUT_FILE_NAME: MikroManager.zip | |
ASSET_NAME: "MikroManager.zip" | |
ASSET_MIME: application/x-zip-compressed | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_id }} | |
release_name: MikroManager ${{ github.run_id }} ${{ matrix.TARGET}} | |
draft: false | |
prerelease: false | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Run image | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.4 | |
- name: Run Poetry Install | |
run: poetry config virtualenvs.create false && poetry install | |
- name: Install Qt because Qt sucks with Poetry | |
run: poetry run pip install pyqt5 | |
- name: Build with pyinstaller for ${{matrix.TARGET}} | |
run: ${{matrix.CMD_BUILD}} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/${{ matrix.OUT_FILE_NAME}} | |
asset_name: ${{ matrix.ASSET_NAME}} | |
asset_content_type: ${{ matrix.ASSET_MIME}} |